[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54524501.8030604@collabora.co.uk>
Date: Thu, 30 Oct 2014 15:02:41 +0100
From: Javier Martinez Canillas <javier.martinez@...labora.co.uk>
To: Krzysztof Kozlowski <k.kozlowski@...sung.com>
CC: Samuel Ortiz <sameo@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
Ben Dooks <ben-linux@...ff.org>,
Kukjin Kim <kgene.kim@...sung.com>,
Russell King <linux@....linux.org.uk>,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, devicetree@...r.kernel.org,
Kyungmin Park <kyungmin.park@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>
Subject: Re: [RFT v3 06/14] regulator: max77802: Remove support for board
files
Hello Krzysztof,
On 10/30/2014 01:53 PM, Krzysztof Kozlowski wrote:
>
> To me a intuitive structure would be:
> MFD device
> |
> - clock device
> |
> - clock1
> - clock2
> - regulator device
> |
> - LDO1
> - LDO2
> etc.
>
> This also maps to structure in DTS. dev_err* messages and any
> allocations should be done on behalf of regulator device, not parent.
>
> Various drivers do this differently... The wm8* drivers set it mostly to
> parent (MFD)...
>
> I do not insists, especially because using parent's device would make
> this driver simpler.
>
Another reason to set it to the parent is to lookup the regulator input supply
node. The regulator_register() function does:
if (supply) {
struct regulator_dev *r;
r = regulator_dev_lookup(dev, supply, &ret);
where dev = config->dev so that will determine on which device node your
input supplies have to be defined. For example on the Peach Pit DTS has this:
max77802: max77802-pmic@9 {
...
inb1-supply = <&tps65090_dcdc2>;
...
inb10-supply = <&tps65090_dcdc1>;
inl1-supply = <&buck5_reg>;
...
inl10-supply = <&buck7_reg>;
...
regulators {
...
};
};
which is how most (all?) DTS define the input supplies. If you instead
do config.dev = &pdev->dev, then the input supplies have to be in the
"regulators" node which is not the standard AFAICT.
This is not a problem for max77686 because I see that DTS don't define
the input supplies but I guess that is because the power scheme is not
completely modeled.
> Mark, maybe you could shed light on it?
>
>
> Best regards,
> Krzysztof
>
>
Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists