Skip to contentSkip to conversation

regulator: tps65090: get regulators node from parent node only

PATCH Applied Laxman Dewangan 2 participants 4 messages Oct 8, 2013 – Oct 9, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: tps65090: get regulators node from parent node only

As per the devicetree binding document of TPS65090, the "regulators" subnode should be under the parent node, not outside of parent node. Hence to get the regulator node, the correct call is of_get_child_by_name() rather than of_find_node_by_name() which searches the "regulators" node from the parent node to end of DTS file.

---
 drivers/regulator/tps65090-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/tps65090-regulator.c +1 -1
index bd611cd..676f755 100644
@@ -180,7 +180,7 @@ static struct tps65090_platform_data *tps65090_parse_dt_reg_data(
 		return ERR_PTR(-ENOMEM);
 	}
 
-	regulators = of_find_node_by_name(np, "regulators");
+	regulators = of_get_child_by_name(np, "regulators");
 	if (!regulators) {
 		dev_err(&pdev->dev, "regulator node not found\n");
 		return ERR_PTR(-ENODEV);
Signature · 1 line
1.7.1.1
#1 lore raw

PATCH 1/1 regulator: tps6586x: get regulators node from parent node only

As per the devicetree binding document of TPS6586x, the "regulators" subnode should be under the parent node, not outside of parent node. Hence to get the regulator node, the correct call is of_get_child_by_name() rather than of_find_node_by_name() which searches the "regulators" node from the parent node to end of DTS file.

---
 drivers/regulator/tps6586x-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/tps6586x-regulator.c +1 -1
index 45e5d68..e8e3a8a 100644
@@ -298,7 +298,7 @@ static struct tps6586x_platform_data *tps6586x_parse_regulator_dt(
 	struct tps6586x_platform_data *pdata;
 	int err;
 
-	regs = of_find_node_by_name(np, "regulators");
+	regs = of_get_child_by_name(np, "regulators");
 	if (!regs) {
 		dev_err(&pdev->dev, "regulator node not found\n");
 		return NULL;
Signature · 1 line
1.7.1.1
#2 lore raw

PATCH 1/1 regulator: tps65910: get regulators node from parent node only

In reply to Laxman Dewangan

As per the devicetree binding document of TPS65910, the "regulators" subnode should be under the parent node, not outside of parent node. Hence to get the regulator node, the correct call is of_get_child_by_name() rather than of_find_node_by_name() which searches the "regulators" node from the parent node to end of DTS file.

---
 drivers/regulator/tps65910-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/tps65910-regulator.c +1 -1
index b8167df..ccde074 100644
@@ -982,7 +982,7 @@ static struct tps65910_board *tps65910_parse_dt_reg_data(
 	}
 
 	np = of_node_get(pdev->dev.parent->of_node);
-	regulators = of_find_node_by_name(np, "regulators");
+	regulators = of_get_child_by_name(np, "regulators");
 	if (!regulators) {
 		dev_err(&pdev->dev, "regulator node not found\n");
 		return NULL;
Signature · 1 line
1.7.1.1
maintainer Applied
#3 lore raw
In reply to Laxman Dewangan
Quoted 5 lines · Laxman Dewangan

As per the devicetree binding document of TPS65090, the "regulators" subnode should be under the parent node, not outside of parent node. Hence to get the regulator node, the correct call is of_get_child_by_name() rather than of_find_node_by_name() which searches the "regulators" node from the parent node to end of DTS file.

Applied all, thanks.