Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1659838
| From | Javier Martinez Canillas <javier@dowhile0.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF |
| Date | 2017-06-07 16:20 +0200 |
| Message-ID | <tPJYt-7IG-5@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <tPGxz-5qX-7@gated-at.bofh.it> <tPGxz-5qX-9@gated-at.bofh.it> <tPHjY-5Y0-15@gated-at.bofh.it> <tPJlN-7eC-33@gated-at.bofh.it> <tPJvs-7jj-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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... >> >> 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. Best regards, Javier
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] mfd: Add a dependency on OF Keerthy <j-keerthy@ti.com> - 2017-06-06 16:50 +0200
[PATCH 5/5] mfd: lp3943: Add a dependency on OF Keerthy <j-keerthy@ti.com> - 2017-06-06 16:50 +0200
[PATCH 3/5] mfd: tps65217: Add a dependency on OF Keerthy <j-keerthy@ti.com> - 2017-06-06 16:50 +0200
Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF Enric Balletbo Serra <eballetbo@gmail.com> - 2017-06-06 17:10 +0200
Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF Keerthy <j-keerthy@ti.com> - 2017-06-07 06:50 +0200
Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF Keerthy <j-keerthy@ti.com> - 2017-06-07 12:40 +0200
Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF Lee Jones <lee.jones@linaro.org> - 2017-06-07 12:40 +0200
Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF Keerthy <j-keerthy@ti.com> - 2017-06-07 13:30 +0200
Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF Enric Balletbo Serra <eballetbo@gmail.com> - 2017-06-07 15:40 +0200
Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF Keerthy <j-keerthy@ti.com> - 2017-06-07 15:50 +0200
Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF Javier Martinez Canillas <javier@dowhile0.org> - 2017-06-07 16:20 +0200
Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF Javier Martinez Canillas <javier@dowhile0.org> - 2017-06-07 16:30 +0200
Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF Keerthy <j-keerthy@ti.com> - 2017-06-08 06:40 +0200
Re: [PATCH 3/5] mfd: tps65217: Add a dependency on OF Lee Jones <lee.jones@linaro.org> - 2017-06-07 12:40 +0200
[PATCH 4/5] mfd: lp873x: Add a dependency on OF Keerthy <j-keerthy@ti.com> - 2017-06-06 16:50 +0200
[PATCH 1/5] mfd: palmas: Add a dependency on OF Keerthy <j-keerthy@ti.com> - 2017-06-06 16:50 +0200
csiph-web