All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: of: Skip disabled regulator nodes
@ 2015-05-12 21:42 ` Stephen Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2015-05-12 21:42 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel, linux-arm-msm, linux-arm-kernel

If a regulator is listed in devicetree, but the node is marked as
"disabled" we should skip parsing the regulator init data and
deny consumers from interacting with the regulator. This
simplifies devicetree maintenance where we can have one dtsi file
with all regulators supported by a PMIC and then select what
regulators are used depending on the board configuration.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 drivers/regulator/of_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index e952439e0d83..bead57e3c67b 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -292,7 +292,7 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
 		return NULL;
 	}
 
-	for_each_child_of_node(search, child) {
+	for_each_available_child_of_node(search, child) {
 		name = of_get_property(child, "regulator-compatible", NULL);
 		if (!name)
 			name = child->name;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] regulator: of: Skip disabled regulator nodes
@ 2015-05-12 21:42 ` Stephen Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2015-05-12 21:42 UTC (permalink / raw)
  To: linux-arm-kernel

If a regulator is listed in devicetree, but the node is marked as
"disabled" we should skip parsing the regulator init data and
deny consumers from interacting with the regulator. This
simplifies devicetree maintenance where we can have one dtsi file
with all regulators supported by a PMIC and then select what
regulators are used depending on the board configuration.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 drivers/regulator/of_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index e952439e0d83..bead57e3c67b 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -292,7 +292,7 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
 		return NULL;
 	}
 
-	for_each_child_of_node(search, child) {
+	for_each_available_child_of_node(search, child) {
 		name = of_get_property(child, "regulator-compatible", NULL);
 		if (!name)
 			name = child->name;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] regulator: of: Skip disabled regulator nodes
  2015-05-12 21:42 ` Stephen Boyd
@ 2015-05-13 11:06   ` Mark Brown
  -1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2015-05-13 11:06 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: linux-kernel, linux-arm-msm, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

On Tue, May 12, 2015 at 02:42:07PM -0700, Stephen Boyd wrote:
> If a regulator is listed in devicetree, but the node is marked as
> "disabled" we should skip parsing the regulator init data and
> deny consumers from interacting with the regulator. This

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] regulator: of: Skip disabled regulator nodes
@ 2015-05-13 11:06   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2015-05-13 11:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, May 12, 2015 at 02:42:07PM -0700, Stephen Boyd wrote:
> If a regulator is listed in devicetree, but the node is marked as
> "disabled" we should skip parsing the regulator init data and
> deny consumers from interacting with the regulator. This

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150513/dfd5fe5e/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-13 11:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-12 21:42 [PATCH] regulator: of: Skip disabled regulator nodes Stephen Boyd
2015-05-12 21:42 ` Stephen Boyd
2015-05-13 11:06 ` Mark Brown
2015-05-13 11:06   ` Mark Brown

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.