Skip to content

Continuing the work on coupled regulators

Dmitry Osipenko linux-devicetree linux-omap linux-tegra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11regulator: core: Add voltage balancing mechanismdrivers/regulator/core.c+229 -00 replies
2/11regulator: core: Change voltage setting pathdrivers/regulator/core.c+99 -460 replies
3/11regulator: core: Mutually resolve regulators couplingdrivers/regulator/core.c+17 -370 replies
4/11regulator: core: Don't allow to get regulator until all couples resolveddrivers/regulator/core.c+10 -00 replies
5/11dt-bindings: regulator: Change regulator-coupled-max-spread propertyDocumentation/devicetree/bindings/regulator/regulator.txt+3 -26 replies
6/11regulator: core: Limit regulators coupling to a single coupleinclude/linux/regulator/driver.h+1 -10 replies
7/11dt-bindings: regulator: Document new regulator-max-step-microvolt propertyDocumentation/devicetree/bindings/regulator/regulator.txt+2 -01 reply
8/11regulator: core: Add new max_uV_step constraintdrivers/regulator/core.c drivers/regulator/of_regulator.c include/linux/regulator/machine.h+48 -00 replies
9/11regulator: core: Decouple regulators on regulator_unregister()drivers/regulator/core.c+38 -00 replies
10/11regulator: core: Use ww_mutex for regulators lockingdrivers/regulator/core.c include/linux/regulator/driver.h+307 -972 replies
11/11regulator: core: Properly handle case where supply is the coupledrivers/regulator/core.c+17 -20 replies

Reviews trailers per patch

2 of 11 patches have a Reviewed-by or Acked-by.

PatchRob Herring
1/11
2/11
3/11
4/11
5/11R-b
6/11
7/11R-b
8/11
9/11
10/11
11/11

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

Read the v1 thread

Cover letter [PATCH v1 00/11] Continuing the work on coupled regulators

Hello,

Maciej moved on to work on something else and kindly allowed me to take over the coupled regulators patches [0] which I'll try to finalize.

I recently started to work on adding DVFS support to the CPUFreq driver of NVIDIA Tegra20/30 which require the coupled regulators functionality. Both Tegra20 and Tegra30 have the voltage "max-spread" constraint. Tegra30 has an additional constraint, the "max-step" voltage.

What is done in this series:

1. Re-worked the original "Add voltage balancing mechanism" patch from Maciej by:
1) Fixing infinite loop within regulator_balance_voltage().
2) Handling suspend_state_t properly.
3) Fixing broken compilation of the patch.

2. Added pair of patches to clean up regulator-couple resolving.

3. Changed device tree binding of the regulator-coupled-max-spread property to make it more flexible.

4. Added new device tree property, the regulator-max-step-microvolt.

5. Implemented wait/wound mutex which was suggested by Lucas Stach in the review comment to [0]. I've tested w/w locking extensively (including CONFIG_DEBUG_WW_MUTEX_SLOWPATH) and quite confident that everything is okay.

6. Patches were tested with KASAN on Tegra20 / Tegra30, I tried to cover various cases and verified that voltage constraints not violated under different circumstances.

Please review, thanks.

[0] https://lkml.org/lkml/2018/4/23/619

Dmitry Osipenko (9):
regulator: core: Mutually resolve regulators coupling
regulator: core: Don't allow to get regulator until all couples
resolved
dt-bindings: regulator: Change regulator-coupled-max-spread property
regulator: core: Limit regulators coupling to a single couple
dt-bindings: regulator: Document new regulator-max-step-microvolt
property
regulator: core: Add new max_uV_step constraint
regulator: core: Decouple regulators on regulator_unregister()
regulator: core: Use ww_mutex for regulators locking
regulator: core: Properly handle case where supply is the couple

Maciej Purski (2):
regulator: core: Add voltage balancing mechanism
regulator: core: Change voltage setting path

 .../bindings/regulator/regulator.txt          |   7 +-
 drivers/regulator/core.c                      | 821 +++++++++++++++---
 drivers/regulator/of_regulator.c              |   4 +
 include/linux/regulator/driver.h              |   5 +-
 include/linux/regulator/machine.h             |   3 +
 5 files changed, 713 insertions(+), 127 deletions(-)
Signature · 1 line
2.19.0