Skip to content

OPP: Replace custom set_opp() with config_regulators()

Viresh Kumar linux-pm lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 0 repliesNew
  2. v15 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Moved back to 80 column width instead of 100.
- Rebased over updated set-config API changes, which forced minor changes to this series as well.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5OPP: Add support for config_regulators() helperdrivers/opp/core.c drivers/opp/opp.h include/linux/pm_opp.h+75 -10 replies
2/5OPP: Make _generic_set_opp_regulator() a config_regulators() interfacedrivers/opp/core.c+12 -390 replies
3/5OPP: Add dev_pm_opp_get_supplies()drivers/opp/core.c include/linux/pm_opp.h+32 -00 replies
4/5OPP: ti: Migrate to config_regulators()drivers/opp/ti-opp-supply.c+34 -400 replies
5/5OPP: Remove custom OPP helper supportdrivers/opp/core.c drivers/opp/opp.h include/linux/pm_opp.h+2 -1720 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by.

PatchDmitry Osipenko
1/5T-b
2/5T-b
3/5T-b
4/5
5/5T-b

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

Read the v2 thread

Cover letter [PATCH V2 0/5] OPP: Replace custom set_opp() with config_regulators()

Hi,

Currently the custom set_opp() helper, which is implemented only for OMAP, is responsible to set both clock and regulators for the device and may end up doing tricky stuff behind the scene. This makes the OPP core contain special code to support it.

This patch series tries to streamline the code path in _set_opp() in the OPP core and minimize the platform specific code within it. The platforms provide a config_regulators() callback now, from which they should only program the regulators in their preferred sequence. Rest of the code sequence to program clk, bw, required-opps, etc is common across all device and platform types and is present in the OPP core.

Keerthy/Dave: I couldn't test it on omap, can any of you do that please ? It builds just fine though. Also maybe you can simplify the OPP driver to drop all restoration logic on failures, as the OPP core doesn't do any of it as well. I can add a patch for that if you guys are fine with it.

This is pushed here along with other dependencies:

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

V1->V2:
- Moved back to 80 column width instead of 100.
- Rebased over updated set-config API changes, which forced minor changes to this series as well.

Thanks.

--
Viresh

Viresh Kumar (5):
OPP: Add support for config_regulators() helper
OPP: Make _generic_set_opp_regulator() a config_regulators() interface
OPP: Add dev_pm_opp_get_supplies()
OPP: ti: Migrate to config_regulators()
OPP: Remove custom OPP helper support

 drivers/opp/core.c          | 218 +++++++++++++-----------------------
 drivers/opp/opp.h           |   9 +-
 drivers/opp/ti-opp-supply.c |  74 ++++++------
 include/linux/pm_opp.h      |  46 ++------
 4 files changed, 125 insertions(+), 222 deletions(-)
Signature · 1 line
2.31.1.272.g89b43f80a514