summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorJohan Hovold <johan+linaro@kernel.org>2022-09-29 18:42:14 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-10-04 17:26:11 +0300
commit129b60c957711a20434f4d4404652f0720e1ba1d (patch)
treec3b8b6d9b2a58b0994d5201095f84e9a30c1dc22 /drivers/base
parentc79e6fa98ca8628556a01fe277022bda64829fdf (diff)
downloadlinux-129b60c957711a20434f4d4404652f0720e1ba1d.tar.xz
PM: domains: log failures to register always-on domains
Always-on PM domains must be on during initialisation or the domain is currently silently rejected. Print an error message in case an always-on domain is not on to make it easier to debug drivers getting this wrong (e.g. by setting an always-on genpd flag without making sure that the state matches). Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/domain.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 55a10e6d4e2a..ead135c7044c 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2085,8 +2085,10 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
/* Always-on domains must be powered on at initialization. */
if ((genpd_is_always_on(genpd) || genpd_is_rpm_always_on(genpd)) &&
- !genpd_status_on(genpd))
+ !genpd_status_on(genpd)) {
+ pr_err("always-on PM domain %s is not on\n", genpd->name);
return -EINVAL;
+ }
/* Multiple states but no governor doesn't make sense. */
if (!gov && genpd->state_count > 1)