summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-22 06:56:33 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-22 06:56:33 -1000
commit74b1dbf6f236f4fe88bd1077ae4657ca4b2c339e (patch)
tree8ac15152cc01c612f89c25232b7e2738ae902b48 /include
parentb0e1eda687a2f19a8fa3958303fbb45d493ea46b (diff)
parenteadea156f11b2c9a780b60c1699c2da145c9d1f2 (diff)
Merge tag 'pwrseq-updates-for-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull power sequencing updates from Bartosz Golaszewski: "The bulk of added lines are kunit tests that comprehensively verify the core functionality of the power sequencing framework. Other than that, we have another pwrseq driver: Renesas RZ/G3L Power Ready and support for more models in pwrseq-pcie-m2. We also added a new consumer-facing API in the form of pwrseq_is_controllable() function which allows consumers to check if a given target resource is actually host-controllable. Summary: Power sequencing core: - add a suite of kunit test cases for the power sequencing core functionalities - provide a new consumer API: pwrseq_is_controllable() New Drivers: - add the Renesas RZ/G3L Power Ready driver which provides information on power readiness for various IPs on RZ/G3L Driver changes: - use pwrseq_is_controllable() to report controllability to consumers in pwrseq-qcom-wcn and pwrseq-pcie-m2 - add support for PCIe switch topologies to pwrseq-pcie-m2 - add the PCI ID for Foxconn WCN7850 to pwrseq-pcie-m2" * tag 'pwrseq-updates-for-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: power: sequencing: pcie-m2: Add Foxconn WCN7850 subsystem PCI ID power: sequencing: qcom-wcn: Report power controllability power: sequencing: pcie-m2: Report power controllability power: sequencing: Add pwrseq_is_controllable() API power: sequencing: add kunit test cases power: sequencing: pwrseq-pcie-m2: Support PCIe switch topologies power: sequencing: Add Renesas RZ/G3L Power Ready driver
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;
};
/**