From: Laxman Dewangan <ldewangan@nvidia.com>
To: broonie@opensource.wolfsonmicro.com, grant.likely@secretlab.ca,
rob.herring@calxeda.com, lrg@ti.com
Cc: devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH V2] regulator: dt: fix the name of regulator supply
Date: Sat, 19 May 2012 01:04:12 +0530 [thread overview]
Message-ID: <1337369652-27094-1-git-send-email-ldewangan@nvidia.com> (raw)
If there is any input supply for regulator then the name
of supply need to provided by init_data->supply_regulator.
In dt case, the input supply is searched by the <name>-supply
and here it is require to fix the name so that correct device
node can be identified at the time of regulator registration.
Fixing the name for input supply as "regulator-supply".
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
Change from V1:
Correction of typo in changelog.
.../devicetree/bindings/regulator/regulator.txt | 4 ++--
drivers/regulator/of_regulator.c | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt
index 5b7a408..6c8de69 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/regulator.txt
@@ -9,7 +9,7 @@ Optional properties:
- regulator-max-microamp: largest current consumers may set
- regulator-always-on: boolean, regulator should never be disabled
- regulator-boot-on: bootloader/firmware enabled regulator
-- <name>-supply: phandle to the parent supply/regulator node
+- regulator-supply: phandle to the parent supply/regulator node
Example:
@@ -17,7 +17,7 @@ Example:
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <2500000>;
regulator-always-on;
- vin-supply = <&vin>;
+ regulator-supply = <&vin>;
};
Regulator Consumers:
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 56593b7..48d6449 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -60,6 +60,9 @@ static void of_get_regulation_constraints(struct device_node *np,
constraints->always_on = true;
else /* status change should be possible if not always on. */
constraints->valid_ops_mask |= REGULATOR_CHANGE_STATUS;
+
+ if (of_find_property(np, "regulator-supply", NULL))
+ (*init_data)->supply_regulator = "regulator";
}
/**
--
1.7.1.1
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
next reply other threads:[~2012-05-18 19:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 19:34 Laxman Dewangan [this message]
2012-05-19 10:43 ` [PATCH V2] regulator: dt: fix the name of regulator supply Mark Brown
2012-05-19 12:38 ` Laxman Dewangan
2012-05-19 13:10 ` Mark Brown
2012-05-19 14:21 ` Laxman Dewangan
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=1337369652-27094-1-git-send-email-ldewangan@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-doc@vger.kernel.org \
--cc=lrg@ti.com \
--cc=rob.herring@calxeda.com \
/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;
as well as URLs for NNTP newsgroup(s).