From: Keerthy <j-keerthy@ti.com>
To: Javier Martinez Canillas <javier@dowhile0.org>
Cc: Enric Balletbo Serra <eballetbo@gmail.com>,
Lee Jones <lee.jones@linaro.org>,
Tony Lindgren <tony@atomide.com>, Milo Kim <milo.kim@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF
Date: Thu, 8 Jun 2017 10:01:19 +0530 [thread overview]
Message-ID: <c09e6c87-53eb-bcc4-0268-9cbf17251f20@ti.com> (raw)
In-Reply-To: <CABxcv=mSqGOG+Z9eHhAnfw=ZR4-US_zVzvo3kNWY4o2mT_C-Ew@mail.gmail.com>
On Wednesday 07 June 2017 07:40 PM, Javier Martinez Canillas wrote:
> Hello Keerthy,
>
> On Wed, Jun 7, 2017 at 3:45 PM, Keerthy <j-keerthy@ti.com> wrote:
>
> [snip]
>
>>>>>>>>>
>>>>>>>>
>>>>>>>> I think you can remove the of_match_device checks in some drivers too
>>>>>>>>
>>>>>>>> i.e:
>>>>>>>>
>>>>>>>> http://elixir.free-electrons.com/linux/latest/source/drivers/mfd/tps65217.c#L330
>>>>>>>
>>>>>>> Yes that and removal of unused i2c_device_id. I will follow it up once
>>>>>>> this OF dependency is in.
>>>>>>
>>>>>> The of_match_device() checks should be removed with the OF patch.
>>>>
>>>> Lee Jones/ Enric,
>>>>
>>>> IIUC of_match_device call is still needed to obtain a match and in case
>>>> there are multiple compatibles with different match data then this call
>>>> is definitely needed.
>>>>
>
> That's correct...
That is what i wanted to know. Thanks.
>
>>>
>>> Not sure if I follow you. My understanding is that with DT the probe
>>> of this driver is only called if there is a node with the compatible =
>>> "ti,tps65217" string. So if probe is called there is always a match
>>> and the call to of_match_device is redundant.
>>
>> How will you get the matching data?
>>
>> For the tps65217 case you mentioned we need the match pointer to get the
>> chip_id right?
>>
>> chip_id = (unsigned long)match->data;
>>
>
> ...but this particular driver only has a single entry in the OF table
> and so you can just do:
>
> tps->id = TPS65217;
>
> Later if there's a variant for this chip, then you can add the logic
> to query the struct of_device_id .data. But for now I think that's
> better to just remove as Enric proposes and also remove the .data
> field from the struct of_device_id entry.
okay agreed for tps65217.
>
> Best regards,
> Javier
>
next prev parent reply other threads:[~2017-06-08 4:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 14:45 [PATCH 0/5] mfd: Add a dependency on OF Keerthy
2017-06-06 14:45 ` [PATCH 1/5] mfd: palmas: " Keerthy
2017-06-06 14:45 ` [PATCH 2/5] mfd: tps65218: " Keerthy
2017-06-06 14:45 ` [PATCH 3/5] mfd: tps65217: " Keerthy
2017-06-06 15:04 ` Enric Balletbo Serra
2017-06-07 4:45 ` Keerthy
2017-06-07 10:37 ` Lee Jones
2017-06-07 10:38 ` Lee Jones
2017-06-07 11:24 ` Keerthy
2017-06-07 13:37 ` Enric Balletbo Serra
2017-06-07 13:45 ` Keerthy
2017-06-07 14:10 ` Javier Martinez Canillas
2017-06-07 14:27 ` Javier Martinez Canillas
2017-06-08 4:31 ` Keerthy [this message]
2017-06-07 10:39 ` Keerthy
2017-06-06 14:45 ` [PATCH 4/5] mfd: lp873x: " Keerthy
2017-06-06 14:45 ` [PATCH 5/5] mfd: lp3943: " Keerthy
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=c09e6c87-53eb-bcc4-0268-9cbf17251f20@ti.com \
--to=j-keerthy@ti.com \
--cc=eballetbo@gmail.com \
--cc=javier@dowhile0.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=milo.kim@ti.com \
--cc=tony@atomide.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