diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-06 16:19:54 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-06 16:19:54 -0500 |
commit | e84b2c202771bbd538866207efcb1f7dbab8045b (patch) | |
tree | 00f62ed8f422c587897c7eb6ac6cd8c4dca508ab /drivers/base/power | |
parent | 4f042cdad40e1566a53b7ae85e72b6945a4b0fde (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/power')
-rw-r--r-- | drivers/base/power/domain.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 5a8d67d51f0e..ad6ba2e04677 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) | |||
209 | goto err; | 209 | goto err; |
210 | 210 | ||
211 | elapsed_ns = ktime_to_ns(ktime_sub(ktime_get(), time_start)); | 211 | elapsed_ns = ktime_to_ns(ktime_sub(ktime_get(), time_start)); |
212 | if (elapsed_ns > genpd->power_on_latency_ns) | 212 | if (elapsed_ns > genpd->power_on_latency_ns) { |
213 | genpd->power_on_latency_ns = elapsed_ns; | 213 | genpd->power_on_latency_ns = elapsed_ns; |
214 | if (genpd->name) | ||
215 | pr_warning("%s: Power-on latency exceeded, " | ||
216 | "new value %lld ns\n", genpd->name, | ||
217 | elapsed_ns); | ||
218 | } | ||
214 | } | 219 | } |
215 | 220 | ||
216 | genpd_set_active(genpd); | 221 | genpd_set_active(genpd); |
@@ -428,8 +433,13 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd) | |||
428 | } | 433 | } |
429 | 434 | ||
430 | elapsed_ns = ktime_to_ns(ktime_sub(ktime_get(), time_start)); | 435 | elapsed_ns = ktime_to_ns(ktime_sub(ktime_get(), time_start)); |
431 | if (elapsed_ns > genpd->power_off_latency_ns) | 436 | if (elapsed_ns > genpd->power_off_latency_ns) { |
432 | genpd->power_off_latency_ns = elapsed_ns; | 437 | genpd->power_off_latency_ns = elapsed_ns; |
438 | if (genpd->name) | ||
439 | pr_warning("%s: Power-off latency exceeded, " | ||
440 | "new value %lld ns\n", genpd->name, | ||
441 | elapsed_ns); | ||
442 | } | ||
433 | } | 443 | } |
434 | 444 | ||
435 | genpd->status = GPD_STATE_POWER_OFF; | 445 | genpd->status = GPD_STATE_POWER_OFF; |