]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
pmdomain: core: Prepare to add the common ->sync_state() support
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 1 Jul 2025 11:47:10 +0000 (13:47 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 9 Jul 2025 11:29:02 +0000 (13:29 +0200)
Before we can implement the common ->sync_state() support in genpd, we need
to allow a few specific genpd providers to opt out from the new behaviour.

Let's introduce GENPD_FLAG_NO_SYNC_STATE as a new genpd config option, to
allow providers to opt out.

Suggested-by: Saravana Kannan <saravanak@google.com>
Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Colibri iMX8X
Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> # TI AM62A,Xilinx ZynqMP ZCU106
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20250701114733.636510-9-ulf.hansson@linaro.org
include/linux/pm_domain.h

index 3578196e6626ba9de1e357880046ecc0762507da..9329554b9c4af15106d8c00de8805012989e8323 100644 (file)
@@ -104,6 +104,11 @@ struct dev_pm_domain_list {
  * GENPD_FLAG_DEV_NAME_FW:     Instructs genpd to generate an unique device name
  *                             using ida. It is used by genpd providers which
  *                             get their genpd-names directly from FW.
+ *
+ * GENPD_FLAG_NO_SYNC_STATE:   The ->sync_state() support is implemented in a
+ *                             genpd provider specific way, likely through a
+ *                             parent device node. This flag makes genpd to
+ *                             skip its internal support for this.
  */
 #define GENPD_FLAG_PM_CLK       (1U << 0)
 #define GENPD_FLAG_IRQ_SAFE     (1U << 1)
@@ -114,6 +119,7 @@ struct dev_pm_domain_list {
 #define GENPD_FLAG_MIN_RESIDENCY (1U << 6)
 #define GENPD_FLAG_OPP_TABLE_FW         (1U << 7)
 #define GENPD_FLAG_DEV_NAME_FW  (1U << 8)
+#define GENPD_FLAG_NO_SYNC_STATE (1U << 9)
 
 enum gpd_status {
        GENPD_STATE_ON = 0,     /* PM domain is on */