opp: of: Support multiple suspend OPPs defined in DT
authorAnson Huang <Anson.Huang@nxp.com>
Tue, 9 Jul 2019 08:00:13 +0000 (16:00 +0800)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 26 Jul 2019 07:55:52 +0000 (13:25 +0530)
commit4527551750e85f9be9296f2b30b19bb257f342e5
tree71bc452ea201008a8310cd1e0ba212068aee6b28
parent518c6880ffc965d59349bf064ff00153cf05f033
opp: of: Support multiple suspend OPPs defined in DT

With property "opp-supported-hw" introduced, the OPP table
in DT could be a large OPP table and ONLY a subset of OPPs
are available, based on the version of the hardware running
on. That introduces restriction of using "opp-suspend"
property to define the suspend OPP, as we are NOT sure if the
OPP containing "opp-suspend" property is available for the
hardware running on, and the of opp core does NOT allow multiple
suspend OPPs defined in DT OPP table.

To eliminate this restrition, make of opp core allow multiple
suspend OPPs defined in DT, and pick the OPP with highest rate
and with "opp-suspend" property present to be suspend OPP, it
can speed up the suspend/resume process.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/of.c