opp: Not all power-domains are scalable
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 17 Jul 2019 05:50:17 +0000 (11:20 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 26 Jul 2019 07:53:31 +0000 (13:23 +0530)
commitbaea35e4db17a72145c84a401f70d496c8ebf833
tree15fcec90c2143ce73d41a623cd056bb1bd57a357
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b
opp: Not all power-domains are scalable

A device may have multiple power-domains and not all of them may be
scalable (i.e. support performance states). But
dev_pm_opp_attach_genpd() doesn't take that into account currently.

Fix that by not verifying the names argument with "power-domain-names"
DT property and finding the index into the required-opps array. The
names argument will anyway get verified later on when we call
dev_pm_domain_attach_by_name().

Fixes: 6319aee10e53 ("opp: Attach genpds to devices from within OPP core")
Reported-by: Rajendra Nayak <rnayak@codeaurora.org>
Tested-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c