All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Mark Brown <broonie@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] regulator: Add coupled regulator
Date: Tue, 12 Jan 2016 08:31:00 -0600	[thread overview]
Message-ID: <20160112143100.GA14628@rob-hp-laptop> (raw)
In-Reply-To: <1452605842-9317-2-git-send-email-maxime.ripard@free-electrons.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: robh@kernel.org (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] regulator: Add coupled regulator
Date: Tue, 12 Jan 2016 08:31:00 -0600	[thread overview]
Message-ID: <20160112143100.GA14628@rob-hp-laptop> (raw)
In-Reply-To: <1452605842-9317-2-git-send-email-maxime.ripard@free-electrons.com>

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

  reply	other threads:[~2016-01-12 14:31 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 13:37 [PATCH v2 0/2] regulator: Add support for parallel regulators Maxime Ripard
2016-01-12 13:37 ` Maxime Ripard
2016-01-12 13:37 ` [PATCH v2 1/2] regulator: Add coupled regulator Maxime Ripard
2016-01-12 13:37   ` Maxime Ripard
2016-01-12 14:31   ` Rob Herring [this message]
2016-01-12 14:31     ` Rob Herring
2016-01-15  8:57     ` Maxime Ripard
2016-01-15  8:57       ` Maxime Ripard
2016-01-17  0:04       ` Rob Herring
2016-01-17  0:04         ` Rob Herring
2016-01-17  0:04         ` Rob Herring
2016-01-18 16:25         ` Mark Brown
2016-01-18 16:25           ` Mark Brown
2016-01-18 16:25           ` Mark Brown
2016-01-21 15:46           ` Maxime Ripard
2016-01-21 15:46             ` Maxime Ripard
2016-01-21 16:28             ` Mark Brown
2016-01-21 16:28               ` Mark Brown
2016-02-05 14:33               ` Maxime Ripard
2016-02-05 14:33                 ` Maxime Ripard
2016-02-05 14:33                 ` Maxime Ripard
2016-02-05 15:32                 ` Mark Brown
2016-02-05 15:32                   ` Mark Brown
2016-02-05 15:32                   ` Mark Brown
2016-11-07 15:47                   ` Maxime Ripard
2016-11-07 15:47                     ` Maxime Ripard
2016-11-07 15:47                     ` Maxime Ripard
2016-11-11 16:46                     ` Mark Brown
2016-11-11 16:46                       ` Mark Brown
2016-01-12 13:37 ` [PATCH v2 2/2] ARM: sunxi: chip: Add Wifi chip Maxime Ripard
2016-01-12 13:37   ` Maxime Ripard
2016-01-12 13:37   ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160112143100.GA14628@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.