diff options
author | Magnus Damm <damm@opensource.se> | 2011-07-10 10:38:53 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-07-10 10:38:53 +0200 |
commit | b9416f03fd9f809225a90f63b2fbc86f90010eab (patch) | |
tree | f0f43787b09fa3d52f8b78bd3aa73b3c7b54e7b1 /arch/arm/mach-shmobile/pm-sh7372.c | |
parent | 999a4d2a4da0527567e4b17d4da0782509358a83 (diff) |
ARM: mach-shmobile: sh7372 late pm domain off
Add sh7372 specific code to power down unused pm domains.
This should really be replaced by some generic PM core
code IMO, but until that happens this patch makes sure
we don't waste power by leaving unused power domains on.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile/pm-sh7372.c')
-rw-r--r-- | arch/arm/mach-shmobile/pm-sh7372.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index a8e0de1277dc..9ad3b610f0fe 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c @@ -96,6 +96,17 @@ static bool pd_active_wakeup(struct device *dev) return true; } +static void sh7372_late_pm_domain_off(void) +{ + /* request power down of unused pm domains */ + queue_work(pm_wq, &sh7372_a4lc.genpd.power_off_work); + queue_work(pm_wq, &sh7372_a4mp.genpd.power_off_work); + queue_work(pm_wq, &sh7372_d4.genpd.power_off_work); + queue_work(pm_wq, &sh7372_a3rv.genpd.power_off_work); + queue_work(pm_wq, &sh7372_a3ri.genpd.power_off_work); + queue_work(pm_wq, &sh7372_a3sg.genpd.power_off_work); +} + void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) { struct generic_pm_domain *genpd = &sh7372_pd->genpd; @@ -107,6 +118,8 @@ void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) genpd->power_off = pd_power_down; genpd->power_on = pd_power_up; pd_power_up(&sh7372_pd->genpd); + + shmobile_runtime_pm_late_init = sh7372_late_pm_domain_off; } void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd, |