summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-22 07:31:02 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-22 07:31:02 -1000
commit0e557fc68a1667183b5f4649ee76e833160c6714 (patch)
tree9ba10d6cbfc66303c188bc8abf7c2563d9279969 /include/linux
parent03480653ddfd1b004dc622acb4fa913b05c3edaa (diff)
parent6d318db9ffcb611f9b3b6b3201c963690541a943 (diff)
Merge tag 'pmdomain-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm
Pull pmdomain updates from Ulf Hansson: "pmdomain core: - Add a genpd config to support unknown initial status - Add support system wide resume latency constraints - Enable a non-CPU device in a CPU PM domain to do power on - Fall back to use device node name for domain idle states pmdomain providers: - cpuidle-psci: Initialize the PM domains in powered off state for OSI - cpuidle-psci: Move initialization a bit earlier in the boot sequence - qcom: Add NMXC power domain for Nord - qcom: Add support for SM7250, Kuno and MSM8952 power domains - renesas: Add support for r8a774a3 SYSC power domains - renesas: Fix lockdep false positive for r8a78000 - riscv: Add RPMI device power service - st: Add the actual power domains on U8500 - st: Convert Ux500 PM domains to schema pm qos: - Add a flag for system wide latency constraints - Add lockless read for flags" * tag 'pmdomain-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: (36 commits) dt-bindings: arm: Add the actual power domains on U8500 dt-bindings: arm: ux500: Drop NR_DOMAINS dt-bindings: power: Convert Ux500 PM domains to schema dt-bindings: power: rpmpd: Add MSM8952 power domains pmdomain: rockchip: drop duplicated errno from supply failure message pmdomain: core: add support system-wide resume latency constraints pmdomain: core: add genpd_for_each_child() helper PM / QoS: add lockless read for flags PM / QoS: add flag to indicate latency applies system-wide pmdomain: renesas: rcar-sys: Add r8a774a3 support dt-bindings: power: Add r8a774a3 SYSC power domain definitions dt-bindings: power: renesas,rcar-sysc: Document vendor-prefixed header paths pmdomain: imx93-blk-ctrl: Use pm_runtime_resume_and_get() pmdomain: imx8m-blk-ctrl: Use pm_runtime_resume_and_get() pmdomain: imx: gpcv2: Use pm_runtime_resume_and_get() pmdomain: rockchip: Fix domain check in rockchip_pm_add_one_domain() pmdomain: core: Fall back to node name for idle states pmdomain: renesas: r8a78000: Fix lockdep false positive pmdomain: fix typo "releated" in comment pmdomain: imx: Propagate SCU provider registration failures ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mailbox/riscv-rpmi-message.h11
-rw-r--r--include/linux/pm_domain.h9
-rw-r--r--include/linux/pm_qos.h9
3 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/mailbox/riscv-rpmi-message.h b/include/linux/mailbox/riscv-rpmi-message.h
index e135c6564d0c..d5362b5821f9 100644
--- a/include/linux/mailbox/riscv-rpmi-message.h
+++ b/include/linux/mailbox/riscv-rpmi-message.h
@@ -93,6 +93,7 @@ static inline int rpmi_to_linux_error(int rpmi_error)
/* RPMI service group IDs */
#define RPMI_SRVGRP_SYSTEM_MSI 0x00002
#define RPMI_SRVGRP_CLOCK 0x00008
+#define RPMI_SRVGRP_DEVICE_POWER 0x00009
/* RPMI clock service IDs */
enum rpmi_clock_service_id {
@@ -119,6 +120,16 @@ enum rpmi_sysmsi_service_id {
RPMI_SYSMSI_SRV_ID_MAX_COUNT
};
+/* RPMI device power service IDs */
+enum rpmi_device_power_service_id {
+ RPMI_DP_SRV_ENABLE_NOTIFICATION = 0x01,
+ RPMI_DP_SRV_GET_NUM_DOMAINS = 0x02,
+ RPMI_DP_SRV_GET_ATTRS = 0x03,
+ RPMI_DP_SRV_SET_STATE = 0x04,
+ RPMI_DP_SRV_GET_STATE = 0x05,
+ RPMI_DP_SRV_ID_MAX_COUNT,
+};
+
/* RPMI Linux mailbox attribute IDs */
enum rpmi_mbox_attribute_id {
RPMI_MBOX_ATTR_SPEC_VERSION,
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index f925614aebdb..14e0e346c610 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -121,6 +121,14 @@ struct dev_pm_domain_list {
* powered-off until the ->sync_state() callback is
* invoked. This flag informs genpd to allow a
* power-off without waiting for ->sync_state().
+ *
+ * GENPD_FLAG_POWER_UNKNOWN: Use this flag to inform genpd that its initial
+ * status for the PM domain is set to powered off,
+ * which may not correctly reflect the state of the
+ * HW, as it's unknown. If the PM domain becomes
+ * powered on during boot, genpd will prevent it
+ * from being powered off until the ->sync_state
+ * callback is invoked for it.
*/
#define GENPD_FLAG_PM_CLK (1U << 0)
#define GENPD_FLAG_IRQ_SAFE (1U << 1)
@@ -133,6 +141,7 @@ struct dev_pm_domain_list {
#define GENPD_FLAG_DEV_NAME_FW (1U << 8)
#define GENPD_FLAG_NO_SYNC_STATE (1U << 9)
#define GENPD_FLAG_NO_STAY_ON (1U << 10)
+#define GENPD_FLAG_POWER_UNKNOWN (1U << 11)
enum gpd_status {
GENPD_STATE_ON = 0, /* PM domain is on */
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 6cea4455f867..439a9e779d81 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -37,6 +37,8 @@ enum pm_qos_flags_status {
#define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1)
#define PM_QOS_FLAG_NO_POWER_OFF (1 << 0)
+/* latency value applies to system-wide suspend/s2idle */
+#define PM_QOS_FLAG_LATENCY_SYS (2 << 0)
enum pm_qos_type {
PM_QOS_UNITIALIZED,
@@ -217,6 +219,12 @@ static inline s32 dev_pm_qos_raw_resume_latency(struct device *dev)
PM_QOS_RESUME_LATENCY_NO_CONSTRAINT :
pm_qos_read_value(&dev->power.qos->resume_latency);
}
+
+static inline s32 dev_pm_qos_raw_flags(struct device *dev)
+{
+ return IS_ERR_OR_NULL(dev->power.qos) ?
+ 0 : READ_ONCE(dev->power.qos->flags.effective_flags);
+}
#else
static inline enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev,
s32 mask)
@@ -298,6 +306,7 @@ static inline s32 dev_pm_qos_raw_resume_latency(struct device *dev)
{
return PM_QOS_RESUME_LATENCY_NO_CONSTRAINT;
}
+static inline s32 dev_pm_qos_raw_flags(struct device *dev) { return 0; }
#endif
static inline int freq_qos_request_active(struct freq_qos_request *req)