From: ahaslam@baylibre.com
To: khilman@linaro.org, ulf.hansson@linaro.org, lina.iyer@linaro.org,
geert@glider.be, k.kozlowski.k@gmail.com, rjw@rjwysocki.net,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: bcousson@baylibre.com, mturquette@baylibre.com,
Axel Haslam <ahaslam+renesas@baylibre.com>
Subject: [PATCH v10 4/6] ARM: imx6: pm: declare pm domain latency on power_state struct.
Date: Tue, 20 Oct 2015 15:26:27 +0200 [thread overview]
Message-ID: <1445347589-5626-5-git-send-email-ahaslam@baylibre.com> (raw)
In-Reply-To: <1445347589-5626-1-git-send-email-ahaslam@baylibre.com>
From: Axel Haslam <ahaslam+renesas@baylibre.com>
The generic_pm_domain structure uses an array of latencies to be able to
declare multiple intermediate states.
Declare a single "OFF" state with the default latencies So that the
power_off_latency_ns and power_on_latency_ns fields of generic_pm_domain
structure can be eventualy removed.
Signed-off-by: Axel Haslam <ahaslam+renesas@baylibre.com>
---
arch/arm/mach-imx/gpc.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index aefe92d..7b839b3 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -45,9 +45,11 @@
struct pu_domain {
struct generic_pm_domain base;
+ struct genpd_power_state *states;
struct regulator *reg;
struct clk *clk[GPC_CLK_MAX];
int num_clks;
+ unsigned int num_states;
};
static void __iomem *gpc_base;
@@ -372,14 +374,22 @@ static struct generic_pm_domain imx6q_arm_domain = {
.name = "ARM",
};
+static struct genpd_power_state imx6q_arm_domain_states[] = {
+ {
+ .name = "OFF",
+ .power_off_latency_ns = 25000,
+ .power_on_latency_ns = 2000000,
+ },
+};
+
static struct pu_domain imx6q_pu_domain = {
.base = {
.name = "PU",
.power_off = imx6q_pm_pu_power_off,
.power_on = imx6q_pm_pu_power_on,
- .power_off_latency_ns = 25000,
- .power_on_latency_ns = 2000000,
},
+ .states = imx6q_arm_domain_states,
+ .num_states = ARRAY_SIZE(imx6q_arm_domain_states),
};
static struct generic_pm_domain imx6sl_display_domain = {
@@ -422,7 +432,9 @@ static int imx_gpc_genpd_init(struct device *dev, struct regulator *pu_reg)
if (!IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS))
return 0;
- pm_genpd_init_simple(&imx6q_pu_domain.base, NULL, false);
+ pm_genpd_init(&imx6q_pu_domain.base, NULL, imx6q_pu_domain.states,
+ imx6q_pu_domain.num_states, false);
+
return of_genpd_add_provider_onecell(dev->of_node,
&imx_gpc_onecell_data);
--
2.4.5
next prev parent reply other threads:[~2015-10-20 13:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-20 13:26 [PATCH v10 0/6] Multiple intermediate states for genpd ahaslam
2015-10-20 13:26 ` [PATCH v10 1/6] PM / Domains: prepare for multiple states ahaslam
2015-10-27 14:33 ` Ulf Hansson
2015-10-27 17:04 ` Axel Haslam
2015-10-20 13:26 ` [PATCH v10 2/6] PM / Domains: core changes " ahaslam
[not found] ` <CAN2waFuQ+72zstgdD7GbxOr=d1T1wkqRvRePfL8KJbTceEGdzA@mail.gmail.com>
2015-11-10 11:02 ` Axel Haslam
2015-10-20 13:26 ` [PATCH v10 3/6] PM / Domains: make governor select deepest state ahaslam
2015-11-10 9:42 ` Zhaoyang Huang
2015-11-10 13:58 ` Axel Haslam
2015-10-20 13:26 ` ahaslam [this message]
2015-10-20 13:26 ` [PATCH v10 5/6] PM / Domains: remove old power on/off latencies ahaslam
2015-10-20 13:26 ` [PATCH v10 6/6] PM / Domains: add debugfs 'states' and 'timings' seq files ahaslam
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=1445347589-5626-5-git-send-email-ahaslam@baylibre.com \
--to=ahaslam@baylibre.com \
--cc=ahaslam+renesas@baylibre.com \
--cc=bcousson@baylibre.com \
--cc=geert@glider.be \
--cc=k.kozlowski.k@gmail.com \
--cc=khilman@linaro.org \
--cc=lina.iyer@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=rjw@rjwysocki.net \
--cc=ulf.hansson@linaro.org \
/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
all inboxes | Powered by JetHome®