Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1307484

Re: [PATCH v2 1/2] regulator: Add coupled regulator

From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] regulator: Add coupled regulator
Date 2016-01-12 15:40 +0100
Message-ID <qQ8h3-2fU-15@gated-at.bofh.it> (permalink)
References <qQ7l1-1vx-23@gated-at.bofh.it> <qQ7l1-1vx-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jan 12, 2016 at 02:37:21PM +0100, Maxime Ripard wrote:
> Some boards, in order to power devices that have a quite high power
> consumption, wire multiple regulators in parallel.
> 
> In such a case, the regulators need to be kept in sync, all of them being
> enabled or disabled in parallel.
> 
> This also requires to expose only the voltages that are common to all the
> regulators.
> 
> Eventually support for changing the voltage in parallel should be added
> too, possibly with delays between each other to avoid having a too brutal
> peak consumption.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  .../bindings/regulator/coupled-voltage.txt         |  18 ++
>  drivers/regulator/Kconfig                          |   8 +
>  drivers/regulator/Makefile                         |   1 +
>  drivers/regulator/coupled-voltage-regulator.c      | 299 +++++++++++++++++++++
>  4 files changed, 326 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/regulator/coupled-voltage.txt
>  create mode 100644 drivers/regulator/coupled-voltage-regulator.c
> 
> diff --git a/Documentation/devicetree/bindings/regulator/coupled-voltage.txt b/Documentation/devicetree/bindings/regulator/coupled-voltage.txt
> new file mode 100644
> index 000000000000..f5401aab52f2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/coupled-voltage.txt
> @@ -0,0 +1,18 @@
> +Coupled voltage regulators
> +
> +Required properties:
> +- compatible		: Must be "coupled-voltage-regulator".
> +
> +Optional properties:
> +- vinX-supply		: Phandle to the regulators it aggregates
> +
> +Any property defined as part of the core regulator binding defined in
> +regulator.txt can also be used.
> +
> +Example:
> +	vcc_wifi: wifi_reg {
> +		compatible = "coupled-voltage-regulator";
> +		regulator-name = "vcc-wifi";
> +		vin0-supply = <&reg_ldo3>;
> +		vin1-supply = <&reg_ldo4>;
> +	};

Why not just make ?-supply a list of phandles? That would be simpler 
than a virtual regulator.

Rob

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] regulator: Add support for parallel regulators Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-01-12 14:40 +0100
  [PATCH v2 2/2] ARM: sunxi: chip: Add Wifi chip Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-01-12 14:40 +0100
  [PATCH v2 1/2] regulator: Add coupled regulator Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-01-12 14:40 +0100
    Re: [PATCH v2 1/2] regulator: Add coupled regulator Rob Herring <robh@kernel.org> - 2016-01-12 15:40 +0100
      Re: [PATCH v2 1/2] regulator: Add coupled regulator Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-01-15 10:00 +0100

csiph-web