public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: palmas: get regulators node from parent node only
@ 2013-10-03 14:06 Laxman Dewangan
  2013-10-04 20:55 ` Stephen Warren
  2013-10-07 11:13 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Laxman Dewangan @ 2013-10-03 14:06 UTC (permalink / raw)
  To: broonie; +Cc: swarren, linux-kernel, lgirdwood, Laxman Dewangan

The device tree binding of Palmas regulator driver says as:

palmas_pmis {
	compatible = "ti,palmas-pmic";
	...
	regulators {
		...
	}
};

In this "regulators" subnode is expected to be part of parent node, not
the 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
actually searches the "regulators" node from the parent node to end of DTS
file.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
The same issue exist on other drivers like tps65910, ts6586x, tps65090.
I will post the patches once this is fine.

 drivers/regulator/palmas-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 9d87c30..9c62b1d 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -820,7 +820,7 @@ static void palmas_dt_to_pdata(struct device *dev,
 	int idx, ret;
 
 	node = of_node_get(node);
-	regulators = of_find_node_by_name(node, "regulators");
+	regulators = of_get_child_by_name(node, "regulators");
 	if (!regulators) {
 		dev_info(dev, "regulator node not found\n");
 		return;
-- 
1.7.1.1


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

* Re: [PATCH] regulator: palmas: get regulators node from parent node only
  2013-10-03 14:06 [PATCH] regulator: palmas: get regulators node from parent node only Laxman Dewangan
@ 2013-10-04 20:55 ` Stephen Warren
  2013-10-07 11:13 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2013-10-04 20:55 UTC (permalink / raw)
  To: Laxman Dewangan, broonie; +Cc: swarren, linux-kernel, lgirdwood

On 10/03/2013 08:06 AM, Laxman Dewangan wrote:
> The device tree binding of Palmas regulator driver says as:
> 
> palmas_pmis {
> 	compatible = "ti,palmas-pmic";
> 	...
> 	regulators {
> 		...
> 	}
> };
> 
> In this "regulators" subnode is expected to be part of parent node, not
> the 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
> actually searches the "regulators" node from the parent node to end of DTS
> file.

Reviewed-by: Stephen Warren <swarren@nvidia.com>

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

* Re: [PATCH] regulator: palmas: get regulators node from parent node only
  2013-10-03 14:06 [PATCH] regulator: palmas: get regulators node from parent node only Laxman Dewangan
  2013-10-04 20:55 ` Stephen Warren
@ 2013-10-07 11:13 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-10-07 11:13 UTC (permalink / raw)
  To: Laxman Dewangan; +Cc: swarren, linux-kernel, lgirdwood

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

On Thu, Oct 03, 2013 at 07:36:37PM +0530, Laxman Dewangan wrote:
> The device tree binding of Palmas regulator driver says as:

Applied, thanks.

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

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

end of thread, other threads:[~2013-10-07 11:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 14:06 [PATCH] regulator: palmas: get regulators node from parent node only Laxman Dewangan
2013-10-04 20:55 ` Stephen Warren
2013-10-07 11:13 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox