summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-10-03 02:05:10 +0200
committerMark Brown <broonie@kernel.org>2026-10-03 02:05:10 +0200
commit585b0d053069a72cffcd3cd177cd1bfe59cd0df2 (patch)
treee58023ef32e7107e6581655264487ec13a2cbae0 /include
parentd4ac342455b9bdeb3f9c5a4686ce0f4d2e1098c6 (diff)
parent09baa2f4caab013160eed975db47235e6c930af4 (diff)
downloadlinux-next-585b0d053069a72cffcd3cd177cd1bfe59cd0df2.tar.gz
linux-next-585b0d053069a72cffcd3cd177cd1bfe59cd0df2.zip
Merge branch 'pwrseq/for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
Diffstat (limited to 'include')
-rw-r--r--include/linux/pwrseq/consumer.h7
-rw-r--r--include/linux/pwrseq/provider.h8
2 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/pwrseq/consumer.h b/include/linux/pwrseq/consumer.h
index 16fad5f3e3ab..b69117ad3fa7 100644
--- a/include/linux/pwrseq/consumer.h
+++ b/include/linux/pwrseq/consumer.h
@@ -25,6 +25,8 @@ int pwrseq_disable(struct pwrseq_desc *desc);
struct device *pwrseq_to_device(struct pwrseq_desc *desc);
+bool pwrseq_is_controllable(struct pwrseq_desc *desc);
+
#else /* CONFIG_POWER_SEQUENCING */
static inline struct pwrseq_desc * __must_check
@@ -58,6 +60,11 @@ static inline struct device *pwrseq_to_device(struct pwrseq_desc *desc)
return NULL;
}
+static inline bool pwrseq_is_controllable(struct pwrseq_desc *desc)
+{
+ return false;
+}
+
#endif /* CONFIG_POWER_SEQUENCING */
#endif /* __POWER_SEQUENCING_CONSUMER_H__ */
diff --git a/include/linux/pwrseq/provider.h b/include/linux/pwrseq/provider.h
index 33b3d2c2e39d..7285ad94a221 100644
--- a/include/linux/pwrseq/provider.h
+++ b/include/linux/pwrseq/provider.h
@@ -6,12 +6,15 @@
#ifndef __POWER_SEQUENCING_PROVIDER_H__
#define __POWER_SEQUENCING_PROVIDER_H__
+#include <linux/types.h>
+
struct device;
struct module;
struct pwrseq_device;
typedef int (*pwrseq_power_state_func)(struct pwrseq_device *);
typedef int (*pwrseq_match_func)(struct pwrseq_device *, struct device *);
+typedef bool (*pwrseq_is_controllable_func)(struct pwrseq_device *);
#define PWRSEQ_NO_MATCH 0
#define PWRSEQ_MATCH_OK 1
@@ -43,11 +46,16 @@ struct pwrseq_unit_data {
* the state lock has been released. It's useful for implementing
* boot-up delays without blocking other users from powering up
* using the same power sequencer.
+ * @is_controllable: Optional callback checking whether enabling/disabling this
+ * target actually controls power (for example when the
+ * controlling GPIO is wired up). If not provided, the
+ * target's power is assumed to be always controllable.
*/
struct pwrseq_target_data {
const char *name;
const struct pwrseq_unit_data *unit;
pwrseq_power_state_func post_enable;
+ pwrseq_is_controllable_func is_controllable;
};
/**