Skip to content

OPP: Simplify required-opp handling

Viresh Kumar linux-pm lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 3 repliesIn review
  2. v23 patches 9 repliesSuperseded
  3. v12 patches 26 repliesSuperseded

Changes in v3 from the cover letter

- Dropped patch 1/3, merged.
- Added a new commit to avoid propagation and a WARN() for parent genpd case.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3OPP: Use _set_opp_level() for single genpd casedrivers/opp/core.c drivers/opp/of.c+32 -50 replies
2/3OPP: Call dev_pm_opp_set_opp() for required OPPsdrivers/opp/core.c drivers/opp/of.c drivers/opp/opp.h +1 more+100 -1000 replies
3/3OPP: Don't set OPP recursively for a parent genpddrivers/opp/core.c drivers/opp/of.c+20 -31 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchUlf HanssonStephan Gerhold
SeriesT-b
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH V3 0/3] OPP: Simplify required-opp handling

Hello,

Configuring the required OPP was never properly implemented, we just took an exception for genpds and configured them directly, while leaving out all other required OPP types.

Now that a standard call to dev_pm_opp_set_opp() takes care of configuring the opp->level too, the special handling for genpds can be avoided by simply calling dev_pm_opp_set_opp() for the required OPPs, which shall eventually configure the corresponding level for genpds.

This also makes it possible for us to configure other type of required OPPs (no concrete users yet though), via the same path. This is how other frameworks take care of parent nodes, like clock, regulators, etc, where we recursively call the same helper.

Pushed here:

git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/required-opps

V2->V3:
- Dropped patch 1/3, merged.
- Added a new commit to avoid propagation and a WARN() for parent genpd case.

V1->V2:
- Support opp-level 0, drop vote i.e..
- Fix OPP pointer while calling dev_pm_opp_set_opp() recursively.
- Minor checks and fixes.
- Add Reviewed-by from Ulf.

--
Viresh

Viresh Kumar (3):
OPP: Use _set_opp_level() for single genpd case
OPP: Call dev_pm_opp_set_opp() for required OPPs
OPP: Don't set OPP recursively for a parent genpd

 drivers/opp/core.c     | 180 ++++++++++++++++++++++-------------------
 drivers/opp/of.c       |  49 ++++++++---
 drivers/opp/opp.h      |   8 +-
 include/linux/pm_opp.h |   7 +-
 4 files changed, 144 insertions(+), 100 deletions(-)
Signature · 1 line
2.31.1.272.g89b43f80a514