diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2021-08-24 17:23:38 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-08-27 20:48:23 +0200 |
commit | 656164181eece68a2f99f0b8a1c5558184b67d7b (patch) | |
tree | 8de638422d050aedc232a94db3461fe22b7fc981 /drivers/base/power | |
parent | 80d4a82e1db819b33742c89917127f4c428e1c98 (diff) | |
download | linux-stable-656164181eece68a2f99f0b8a1c5558184b67d7b.tar.gz linux-stable-656164181eece68a2f99f0b8a1c5558184b67d7b.tar.bz2 linux-stable-656164181eece68a2f99f0b8a1c5558184b67d7b.zip |
PM: domains: Fix domain attach for CONFIG_PM_OPP=n
If CONFIG_PM_OPP=n, of_get_required_opp_performance_state() always
returns -EOPNOTSUPP, and all drivers for devices that are part of a PM
Domain fail to probe with:
failed to set required performance state for power-domain foo: -95
probe of bar failed with error -95
Fix this by treating -EOPNOTSUPP the same as -ENODEV.
Fixes: c016baf7dc58e77a ("PM: domains: Add support for 'required-opps' to set default perf state")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power')
-rw-r--r-- | drivers/base/power/domain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index e1c8994ae225..adb41de68e0a 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2689,7 +2689,7 @@ static int __genpd_dev_pm_attach(struct device *dev, struct device *base_dev, /* Set the default performance state */ pstate = of_get_required_opp_performance_state(dev->of_node, index); - if (pstate < 0 && pstate != -ENODEV) { + if (pstate < 0 && pstate != -ENODEV && pstate != -EOPNOTSUPP) { ret = pstate; goto err; } else if (pstate > 0) { |