Re: [PATCH v3] regulator: Add driver for voltage controlled regulators

From: Rob Herring
Date: Mon Apr 03 2017 - 13:00:12 EST


On Fri, Mar 31, 2017 at 01:50:35PM -0700, Matthias Kaehlcke wrote:
> The output voltage of a voltage controlled regulator can be controlled
> through the voltage of another regulator. The current version of this
> driver assumes that the output voltage is a linear function of the control
> voltage.
>
> Signed-off-by: Matthias Kaehlcke <mka@xxxxxxxxxxxx>
> ---
> Changes in v3:
> - Pre-calculate limits for OVP-safe downward transitions with a discrete
> control regulator
> - Use regulator_get_linear_step() and regulator_count_voltages() to
> determine if the control regulator is continuous or discrete
> - Changed some log messages to start with lowercase character for
> consistency
> - Misc formatting fixes
>
> Changes in v2:
> - Don't configure control regulator as supply
> - Added enable/disable ops to turn control regulator on/off
> - Use regulator_has_continuous_voltage_range() to determine if control
> regulator is continuous or discrete
> - Use regulator-min/max-microvolt as output voltage range
> - Updated and fixed example in DT bindings
> - Updated commit message
>
> .../devicetree/bindings/regulator/vctrl.txt | 50 ++

Acked-by: Rob Herring <robh@xxxxxxxxxx>

> drivers/regulator/Kconfig | 7 +
> drivers/regulator/Makefile | 1 +
> drivers/regulator/vctrl-regulator.c | 553 +++++++++++++++++++++
> 4 files changed, 611 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/regulator/vctrl.txt
> create mode 100644 drivers/regulator/vctrl-regulator.c