mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Graeme Gregory <gg@slimlogic.co.uk>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: "sameo@linux.intel.com" <sameo@linux.intel.com>,
	"broonie@opensource.wolfsonmicro.com" 
	<broonie@opensource.wolfsonmicro.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Stephen Warren <swarren@nvidia.com>,
	"ian@slimlogic.co.uk" <ian@slimlogic.co.uk>
Subject: Re: [PATCH 2/2] mfd: palmas: get rid of of_platform_populate() in DT registration
Date: Wed, 27 Feb 2013 14:36:34 +0000	[thread overview]
Message-ID: <512E19F2.7060801@slimlogic.co.uk> (raw)
In-Reply-To: <512E17AD.1080703@nvidia.com>

On 27/02/13 14:26, Laxman Dewangan wrote:
> On Wednesday 27 February 2013 07:51 PM, Graeme Gregory wrote:
>> On 27/02/13 14:08, Laxman Dewangan wrote:
>>> If driver is getting registered through DT then it look for
>>> population of platform data which is not possible if platform
>>> completely support the DT.
>> No it doesnt!
>>> In this case, if device is registered through DT then just ignore
>>> platform data population and continue the further registration.
>>> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
>>> ---
>>>   drivers/mfd/palmas.c |   21 +++++++++------------
>>>   1 files changed, 9 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
>>> index 25f0eab..6771d9b 100644
>>> --- a/drivers/mfd/palmas.c
>>> +++ b/drivers/mfd/palmas.c
>>> @@ -465,18 +465,6 @@ static int palmas_i2c_probe(struct i2c_client
>>> *i2c,
>>>       if (ret)
>>>           goto err_irq;
>>>   -    /*
>>> -     * If we are probing with DT do this the DT way and return here
>>> -     * otherwise continue and add devices using mfd helpers.
>>> -     */
>>> -    if (node) {
>>> -        ret = of_platform_populate(node, NULL, NULL, &i2c->dev);
>>> -        if (ret < 0)
>>> -            goto err_irq;
>>> -        else
>>> -            return ret;
>>> -    }
>>> -
>> At this point we exit the function and do nothing with the platform data
>> which should work on wholy DT systems. I have tested it!
>
>
> I think then dt files are different in this case. I did not saw the
> documentation of dt file.
> But following is my entry in dts file which we follow for other devices:
>
>         i2c@7000d000 {
>                 status = "okay";
>                 clock-frequency = <100000>;
>
>   ::::::::::::::
>                 tps65913@58 {
>                         compatible = "ti,palmas";
>                         reg = <0x58>;
>                         interrupts = <0 86 0x4>;
>
>                         #interrupt-cells = <2>;
>                         interrupt-controller;
>
>                         #gpio-cells = <2>;
>                         gpio-controller;
>
>                         regulators {
>                                 smps12 {
>                                         regulator-name = "palmas-smps12";
>                                         regulator-min-microvolt =
> <1350000>;
>                                         regulator-max-microvolt =
> <1350000>;
>                                         regulator-always-on;
>                                         regulator-boot-on;
>                                 };
>
>                                 smps3 {
>                                         regulator-name = "palmas-smps3";
>                                         regulator-min-microvolt =
> <1800000>;
>                                         regulator-max-microvolt =
> <1800000>;
>                                         regulator-always-on;
>                                         regulator-boot-on;
>                                 };
> :::::::::::::::
>                     };
>             };
>     };
>
>
> In the above DT file, it does not work.
>
>
I did slip up and forget to push the documentation file, it has since
started the upstream here

http://article.gmane.org/gmane.linux.documentation/9491/match=palmas+dts

The design of the palmas was to make it properly hierarchical to stop
nasty hacks like accessing parent of parent. As a MFD children should
not be tightly bonded to the MFD device!
 
Graeme


      reply	other threads:[~2013-02-27 14:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27 14:08 [PATCH 1/2] mfd: palmas: provide irq flags through DT/platform data Laxman Dewangan
2013-02-27 14:08 ` [PATCH 2/2] mfd: palmas: get rid of of_platform_populate() in DT registration Laxman Dewangan
2013-02-27 14:21   ` Graeme Gregory
2013-02-27 14:26     ` Laxman Dewangan
2013-02-27 14:36       ` Graeme Gregory [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=512E19F2.7060801@slimlogic.co.uk \
    --to=gg@slimlogic.co.uk \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=ian@slimlogic.co.uk \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=swarren@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®