From: Tushar Behera <tushar.behera@linaro.org>
To: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: rob@landley.net, olof@lixom.net,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org
Subject: [PATCH 1/2] PM / Domains: Add pd_ignore_unused to keep power domains enabled
Date: Fri, 28 Mar 2014 10:50:21 +0530 [thread overview]
Message-ID: <1395984022-8284-2-git-send-email-tushar.behera@linaro.org> (raw)
In-Reply-To: <1395984022-8284-1-git-send-email-tushar.behera@linaro.org>
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>
CC: "Rafael J. Wysocki" <rjw@rjwysocki.net>
CC: linux-pm@vger.kernel.org
---
Documentation/kernel-parameters.txt | 7 +++++++
drivers/base/power/domain.c | 13 +++++++++++++
2 files changed, 20 insertions(+)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 50a001a..96bb532 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2557,6 +2557,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.
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 6f54962..ae098a2 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)
--
1.7.9.5
prev parent reply other threads:[~2014-03-28 5:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 5:20 [PATCH 0/2] Add reg_ignore_unused and pd_ignore_unused Tushar Behera
2014-03-28 5:20 ` Tushar Behera [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1395984022-8284-2-git-send-email-tushar.behera@linaro.org \
--to=tushar.behera@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=olof@lixom.net \
--cc=rjw@rjwysocki.net \
--cc=rob@landley.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).