Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: lokeshvutla@ti.com (Lokesh Vutla)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/9] regulator: lp873x: Add support for populating input supply
Date: Fri, 14 Oct 2016 18:30:28 +0530	[thread overview]
Message-ID: <20161014130033.14172-5-lokeshvutla@ti.com> (raw)
In-Reply-To: <20161014130033.14172-1-lokeshvutla@ti.com>

In order to have a proper topology of regulators for a platform, each
registering regulator needs to populate supply_name field for identifying
its supply's name. Add supply_name field for lp873x regulators.

Cc: Lee Jones <lee.jones@linaro.org>
Cc: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 Documentation/devicetree/bindings/mfd/lp873x.txt | 8 ++++++++
 drivers/regulator/lp873x-regulator.c             | 1 +
 2 files changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/lp873x.txt b/Documentation/devicetree/bindings/mfd/lp873x.txt
index 52766c2..936cba3 100644
--- a/Documentation/devicetree/bindings/mfd/lp873x.txt
+++ b/Documentation/devicetree/bindings/mfd/lp873x.txt
@@ -7,6 +7,9 @@ Required properties:
   - #gpio-cells:	Should be two.  The first cell is the pin number and
 			the second cell is used to specify flags.
 			See ../gpio/gpio.txt for more information.
+  - xxx-supply:		Phandle to parent supply node of each regulator
+			populated under regulators node. xxx should match
+			the supply_name populated in driver.
   - regulators:	List of child nodes that specify the regulator
 			initialization data.
 Example:
@@ -17,6 +20,11 @@ pmic: lp8733 at 60 {
 	gpio-controller;
 	#gpio-cells = <2>;
 
+	buck0-in-supply = <&vsys_3v3>;
+	buck1-in-supply = <&vsys_3v3>;
+	ldo0-in-supply = <&vsys_3v3>;
+	ldo1-in-supply = <&vsys_3v3>;
+
 	regulators {
 		lp8733_buck0: buck0 {
 			regulator-name = "lp8733-buck0";
diff --git a/drivers/regulator/lp873x-regulator.c b/drivers/regulator/lp873x-regulator.c
index e504b91..70e3df6 100644
--- a/drivers/regulator/lp873x-regulator.c
+++ b/drivers/regulator/lp873x-regulator.c
@@ -24,6 +24,7 @@
 	[_id] = {							\
 		.desc = {						\
 			.name			= _name,		\
+			.supply_name		= _of "-in",		\
 			.id			= _id,			\
 			.of_match		= of_match_ptr(_of),	\
 			.regulators_node	= of_match_ptr("regulators"),\
-- 
2.9.3

  parent reply	other threads:[~2016-10-14 13:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 13:00 [PATCH 0/9] ARM: DRA7: Add support for DRA718-evm Lokesh Vutla
2016-10-14 13:00 ` [PATCH 1/9] ARM: dts: dra72-evm: Remove pinmux configurations for erratum i869 Lokesh Vutla
2016-10-14 13:00 ` [PATCH 2/9] ARM: dra72-evm: Fix modelling of regulators Lokesh Vutla
2016-10-14 13:00 ` [PATCH 3/9] ARM: dts: dra72: Add separate dtsi for tps65917 Lokesh Vutla
2016-10-14 13:00 ` Lokesh Vutla [this message]
2016-10-18 14:27   ` [PATCH 4/9] regulator: lp873x: Add support for populating input supply Rob Herring
2016-10-19  4:50     ` Lokesh Vutla
2016-10-14 13:00 ` [PATCH 5/9] ARM: OMAP2+: board-generic: add support for DRA71x family Lokesh Vutla
2016-10-18 14:30   ` Rob Herring
2016-10-14 13:00 ` [PATCH 6/9] ARM: DRA7: hwmod: Do not register RTC on DRA71 Lokesh Vutla
2016-10-14 13:00 ` [PATCH 7/9] ARM: dts: Add support for dra718-evm Lokesh Vutla
2016-10-14 13:00 ` [PATCH 8/9] ARM: omap2plus_defconfig: Enable REGULATOR_GPIO Lokesh Vutla
2016-10-14 13:00 ` [PATCH 9/9] ARM: omap2plus_defconfig: Enable LP873X support Lokesh Vutla

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=20161014130033.14172-5-lokeshvutla@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox