* [PATCH 03/05] ARM: mach-shmobile: sh7372 late pm domain off
@ 2011-07-07 13:32 Magnus Damm
0 siblings, 0 replies; 2+ messages in thread
From: Magnus Damm @ 2011-07-07 13:32 UTC (permalink / raw)
To: linux-sh
From: Magnus Damm <damm@opensource.se>
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>
---
arch/arm/mach-shmobile/pm-sh7372.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
--- 0005/arch/arm/mach-shmobile/pm-sh7372.c
+++ work/arch/arm/mach-shmobile/pm-sh7372.c 2011-07-07 20:15:19.000000000 +0900
@@ -96,6 +96,17 @@ static bool pd_active_wakeup(struct devi
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
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,
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 03/05] ARM: mach-shmobile: sh7372 late pm domain off
2011-07-07 13:32 [PATCH 00/05] ARM: mach-shmobile: another sh7372 power domain update Magnus Damm
@ 2011-07-07 13:32 ` Magnus Damm
0 siblings, 0 replies; 2+ messages in thread
From: Magnus Damm @ 2011-07-07 13:32 UTC (permalink / raw)
To: linux-sh; +Cc: linux-pm
From: Magnus Damm <damm@opensource.se>
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>
---
arch/arm/mach-shmobile/pm-sh7372.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
--- 0005/arch/arm/mach-shmobile/pm-sh7372.c
+++ work/arch/arm/mach-shmobile/pm-sh7372.c 2011-07-07 20:15:19.000000000 +0900
@@ -96,6 +96,17 @@ static bool pd_active_wakeup(struct devi
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
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,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-07 13:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 13:32 [PATCH 03/05] ARM: mach-shmobile: sh7372 late pm domain off Magnus Damm
-- strict thread matches above, loose matches on Subject: below --
2011-07-07 13:32 [PATCH 00/05] ARM: mach-shmobile: another sh7372 power domain update Magnus Damm
2011-07-07 13:32 ` [PATCH 03/05] ARM: mach-shmobile: sh7372 late pm domain off Magnus Damm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.