Re: [PATCH] regulator: palmas: use correct device node for DT parsing

From: Laxman Dewangan
Date: Wed Feb 27 2013 - 09:29:54 EST

On Wednesday 27 February 2013 07:53 PM, Graeme Gregory wrote:
On 27/02/13 14:10, Laxman Dewangan wrote:
When device is registered through the DT then regulators node
exist in the parent device node of regulator driver. Hence passing
parent device node for parsing DT in place of self-device node
which is typically NULL.

Signed-off-by: Laxman Dewangan <ldewangan@xxxxxxxxxx>
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 e915629..f07501d 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -591,7 +591,7 @@ static int palmas_probe(struct platform_device *pdev)
struct palmas *palmas = dev_get_drvdata(pdev->dev.parent);
struct palmas_pmic_platform_data *pdata = pdev->dev.platform_data;
- struct device_node *node = pdev->dev.of_node;
+ struct device_node *node = pdev->dev.parent->of_node;
struct regulator_dev *rdev;
struct regulator_config config = { };
struct palmas_pmic *pmic;
This is not correct, nor is the reasoning.

I suspect your previous patch broke DT probing so your not getting nodes
filled in.

I pasted my DT files in other patch for discussion. This is the way we are following for other device and DT file population.
Probably, I need to see your test DT file for more discussion.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at