aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2014-03-28 01:20:21 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-04-07 08:15:49 -0400
commit39ac5ba51b69a77a30d2e783aed02ec73c9f6d70 (patch)
treeb63ff6683b2e3e4e2b1e195e2e161d6e3245c00b
parent70f6c087573eeb406252ff8d98f511eb5f71496e (diff)
PM / domains: Add pd_ignore_unused to keep power domains enabled
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>
-rw-r--r--Documentation/kernel-parameters.txt7
-rw-r--r--drivers/base/power/domain.c13
2 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index bc3478581f67..d4aff4086952 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2558,6 +2558,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2558 2558
2559 pcmv= [HW,PCMCIA] BadgePAD 4 2559 pcmv= [HW,PCMCIA] BadgePAD 4
2560 2560
2561 pd_ignore_unused
2562 [PM]
2563 Keep all power-domains already enabled by bootloader on,
2564 even if no driver has claimed them. This is useful
2565 for debug and development, but should not be
2566 needed on a platform with proper driver support.
2567
2561 pd. [PARIDE] 2568 pd. [PARIDE]
2562 See Documentation/blockdev/paride.txt. 2569 See Documentation/blockdev/paride.txt.
2563 2570
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 6f54962aae1d..ae098a261fcd 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -705,6 +705,14 @@ static int pm_genpd_runtime_resume(struct device *dev)
705 return 0; 705 return 0;
706} 706}
707 707
708static bool pd_ignore_unused;
709static int __init pd_ignore_unused_setup(char *__unused)
710{
711 pd_ignore_unused = true;
712 return 1;
713}
714__setup("pd_ignore_unused", pd_ignore_unused_setup);
715
708/** 716/**
709 * pm_genpd_poweroff_unused - Power off all PM domains with no devices in use. 717 * pm_genpd_poweroff_unused - Power off all PM domains with no devices in use.
710 */ 718 */
@@ -712,6 +720,11 @@ void pm_genpd_poweroff_unused(void)
712{ 720{
713 struct generic_pm_domain *genpd; 721 struct generic_pm_domain *genpd;
714 722
723 if (pd_ignore_unused) {
724 pr_warn("genpd: Not disabling unused power domains\n");
725 return;
726 }
727
715 mutex_lock(&gpd_list_lock); 728 mutex_lock(&gpd_list_lock);
716 729
717 list_for_each_entry(genpd, &gpd_list, gpd_list_node) 730 list_for_each_entry(genpd, &gpd_list, gpd_list_node)