diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-08 17:27:28 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-09 17:22:41 -0500 |
commit | 925b44a273aa8c4c23c006c1228aacd538eead09 (patch) | |
tree | 107742feb4aa12727de15daf5d472968967ce142 /drivers/base | |
parent | c9914854b4ca339e511d052ce3a1a441ef15b928 (diff) |
PM / Domains: Provide an always on power domain governor
Since systems are likely to have power domains that can't be turned off
for various reasons at least temporarily while implementing power domain
support provide a default governor which will always refuse to power off
the domain, saving platforms having to implement their own.
Since the code is so tiny don't bother with a Kconfig symbol for it.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/domain_governor.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c index da78540e9b40..51527ee92d10 100644 --- a/drivers/base/power/domain_governor.c +++ b/drivers/base/power/domain_governor.c | |||
@@ -141,3 +141,16 @@ struct dev_power_governor simple_qos_governor = { | |||
141 | .stop_ok = default_stop_ok, | 141 | .stop_ok = default_stop_ok, |
142 | .power_down_ok = default_power_down_ok, | 142 | .power_down_ok = default_power_down_ok, |
143 | }; | 143 | }; |
144 | |||
145 | static bool always_on_power_down_ok(struct dev_pm_domain *domain) | ||
146 | { | ||
147 | return false; | ||
148 | } | ||
149 | |||
150 | /** | ||
151 | * pm_genpd_gov_always_on - A governor implementing an always-on policy | ||
152 | */ | ||
153 | struct dev_power_governor pm_domain_always_on_gov = { | ||
154 | .power_down_ok = always_on_power_down_ok, | ||
155 | .stop_ok = default_stop_ok, | ||
156 | }; | ||