summaryrefslogtreecommitdiff
path: root/drivers/base/power/domain.c
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2022-10-25 15:34:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-03 17:56:56 +0300
commit2a47cc2a3d04339d69768ddc3db39f6b530802ef (patch)
tree2f8491e81ebdca8459ec4a597bdf2bb18ad939c5 /drivers/base/power/domain.c
parenta49e74cc7489bedfaedaa8d38dc92f6b1e7f90ba (diff)
downloadlinux-2a47cc2a3d04339d69768ddc3db39f6b530802ef.tar.xz
PM: domains: Fix handling of unavailable/disabled idle states
[ Upstream commit e0c57a5c70c13317238cb19a7ded0eab4a5f7de5 ] Platforms can provide the information about the availability of each idle states via status flag. Platforms may have to disable one or more idle states for various reasons like broken firmware or other unmet dependencies. Fix handling of such unavailable/disabled idle states by ignoring them while parsing the states. Fixes: a3381e3a65cb ("PM / domains: Fix up domain-idle-states OF parsing") Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/base/power/domain.c')
-rw-r--r--drivers/base/power/domain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 8428d02cfe58..4f63a8bc7260 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2622,6 +2622,10 @@ static int genpd_iterate_idle_states(struct device_node *dn,
np = it.node;
if (!of_match_node(idle_state_match, np))
continue;
+
+ if (!of_device_is_available(np))
+ continue;
+
if (states) {
ret = genpd_parse_state(&states[i], np);
if (ret) {