summaryrefslogtreecommitdiffstats
path: root/drivers/base/power
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2014-03-28 06:20:21 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-04-07 14:15:49 +0200
commit39ac5ba51b69a77a30d2e783aed02ec73c9f6d70 (patch)
treeb63ff6683b2e3e4e2b1e195e2e161d6e3245c00b /drivers/base/power
parentMerge tag 'pm+acpi-3.15-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadlinux-39ac5ba51b69a77a30d2e783aed02ec73c9f6d70.tar.xz
linux-39ac5ba51b69a77a30d2e783aed02ec73c9f6d70.zip
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>
Diffstat (limited to 'drivers/base/power')
-rw-r--r--drivers/base/power/domain.c13
1 files changed, 13 insertions, 0 deletions
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)
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)