summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2014-03-21 20:51:59 +0530
committerLaxman Dewangan <ldewangan@nvidia.com>2014-03-23 18:02:39 -0700
commited87efab33c0597b0a933bc94b5213bb309a0add (patch)
treefdb880ab323d2e954082d152689f7250f5f4363f /drivers/regulator
parent2b58df14ac10b8dd1350cc0831dbd3fcf3d962a2 (diff)
regulator: add support to disable regualtor consumer node from DT
Sometimes it is require to disable consumer list for some of the board configuration from top level DTS file when using the common power tree file across different boards/configuration. Add support to have status property in the condumer node to ignore the consumer supply from DT. Change-Id: I1a42a1feaf0ae816833d43dffd1b1da29eb09d33 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/385002
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/of_regulator.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index b380368d3f3e..c01480c89aaa 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -48,6 +48,11 @@ static void of_get_regulator_consumer_list(struct device *dev,
ncount = 0;
for_each_child_of_node(np_consumer, child) {
+ /* Ignore the consumer if it is disabled. */
+ ret = of_device_is_available(child);
+ if (!ret)
+ continue;
+
ret = of_property_read_string(child,
"regulator-consumer-supply",
&consumer[ncount].supply);