]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
PM / domains: Add pd_ignore_unused to keep power domains enabled
authorTushar Behera <tushar.behera@linaro.org>
Fri, 28 Mar 2014 05:20:21 +0000 (10:50 +0530)
committerRobin Gong <b38343@freescale.com>
Wed, 11 Feb 2015 05:07:29 +0000 (13:07 +0800)
Keep all power-domains already enabled by bootloader on, even if no
driver has claimed them. This is useful for debug and development, but
should not be needed on a platform with proper driver support.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 39ac5ba51b69a77a30d2e783aed02ec73c9f6d70)
(cherry picked from commit 8507e882be1aa8363d229e6dbc8367c963e37bd3)

Documentation/kernel-parameters.txt
drivers/base/power/domain.c

index 7116fda7077ffce993b0d2456869934ab8c3ee09..f8b43ad33bdce2db91e9b9bc43f37935f13f2a90 100644 (file)
@@ -2537,6 +2537,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 
        pcmv=           [HW,PCMCIA] BadgePAD 4
 
+       pd_ignore_unused
+                       [PM]
+                       Keep all power-domains already enabled by bootloader on,
+                       even if no driver has claimed them. This is useful
+                       for debug and development, but should not be
+                       needed on a platform with proper driver support.
+
        pd.             [PARIDE]
                        See Documentation/blockdev/paride.txt.
 
index 6f54962aae1dd1a6160b777238b37f639f03f80f..ae098a261fcdb29262e778036ad5e9712841f221 100644 (file)
@@ -705,6 +705,14 @@ static int pm_genpd_runtime_resume(struct device *dev)
        return 0;
 }
 
+static bool pd_ignore_unused;
+static int __init pd_ignore_unused_setup(char *__unused)
+{
+       pd_ignore_unused = true;
+       return 1;
+}
+__setup("pd_ignore_unused", pd_ignore_unused_setup);
+
 /**
  * pm_genpd_poweroff_unused - Power off all PM domains with no devices in use.
  */
@@ -712,6 +720,11 @@ void pm_genpd_poweroff_unused(void)
 {
        struct generic_pm_domain *genpd;
 
+       if (pd_ignore_unused) {
+               pr_warn("genpd: Not disabling unused power domains\n");
+               return;
+       }
+
        mutex_lock(&gpd_list_lock);
 
        list_for_each_entry(genpd, &gpd_list, gpd_list_node)