OPP: Don't set OPP recursively for a parent genpd
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 16 Nov 2023 10:29:35 +0000 (15:59 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 28 Nov 2023 10:33:25 +0000 (16:03 +0530)
commit925141432fa4d8325b7156e88e53d740b12d0b0e
tree16c7c6d5262f018ab15819f5f215fd3aef9867e5
parente37440e7e2c2760475d60c5556b59c8880a7fd63
OPP: Don't set OPP recursively for a parent genpd

Like other frameworks (clk, regulator, etc.) genpd core too takes care
of propagation to performance state to parent genpds. The OPP core
shouldn't attempt the same, or it may result in undefined behavior.

Add checks at various places to take care of the same.

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c
drivers/opp/of.c