summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-12-06 22:19:54 +0100
committerRafael J. Wysocki <rjw@sisk.pl>2011-12-06 22:19:54 +0100
commite84b2c202771bbd538866207efcb1f7dbab8045b (patch)
tree00f62ed8f422c587897c7eb6ac6cd8c4dca508ab /drivers/base
parent4f042cdad40e1566a53b7ae85e72b6945a4b0fde (diff)
PM / Domains: Make it possible to assign names to generic PM domains
Add a name member pointer to struct generic_pm_domain and use it in diagnostic messages regarding the domain power-off and power-on latencies. Update the ARM shmobile SH7372 code to assign names to the PM domains used by it. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Magnus Damm <damm@opensource.se>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/domain.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 5a8d67d51f0..ad6ba2e0467 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -209,8 +209,13 @@ int __pm_genpd_poweron(struct generic_pm_domain *genpd)
goto err;
elapsed_ns = ktime_to_ns(ktime_sub(ktime_get(), time_start));
- if (elapsed_ns > genpd->power_on_latency_ns)
+ if (elapsed_ns > genpd->power_on_latency_ns) {
genpd->power_on_latency_ns = elapsed_ns;
+ if (genpd->name)
+ pr_warning("%s: Power-on latency exceeded, "
+ "new value %lld ns\n", genpd->name,
+ elapsed_ns);
+ }
}
genpd_set_active(genpd);
@@ -428,8 +433,13 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd)
}
elapsed_ns = ktime_to_ns(ktime_sub(ktime_get(), time_start));
- if (elapsed_ns > genpd->power_off_latency_ns)
+ if (elapsed_ns > genpd->power_off_latency_ns) {
genpd->power_off_latency_ns = elapsed_ns;
+ if (genpd->name)
+ pr_warning("%s: Power-off latency exceeded, "
+ "new value %lld ns\n", genpd->name,
+ elapsed_ns);
+ }
}
genpd->status = GPD_STATE_POWER_OFF;