Skip to content

Commit 6561641

Browse files
geerturafaeljw
authored andcommitted
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: c016baf ("PM: domains: Add support for 'required-opps' to set default perf state") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 80d4a82 commit 6561641

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/power/domain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2689,7 +2689,7 @@ static int __genpd_dev_pm_attach(struct device *dev, struct device *base_dev,
26892689

26902690
/* Set the default performance state */
26912691
pstate = of_get_required_opp_performance_state(dev->of_node, index);
2692-
if (pstate < 0 && pstate != -ENODEV) {
2692+
if (pstate < 0 && pstate != -ENODEV && pstate != -EOPNOTSUPP) {
26932693
ret = pstate;
26942694
goto err;
26952695
} else if (pstate > 0) {

0 commit comments

Comments
 (0)