[lkml]   [2018]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/3] IIO: st_sensors_i2c: improve device enumeration
On Mon, Jul 2, 2018 at 9:41 AM, Nikolaus Voss
<> wrote:
> On Fri, 29 Jun 2018, Andy Shevchenko wrote:
>> I'm not sure I understand how ->probe_new() is supposed to work
>> against i2c_id_table, but I don't care for legacy platform data
>> anyway.
>> What I would like to point to is device_get_match_data() API which
>> should simplify / unify the case how you get driver data.
> This driver doesn't need any driver data/ platform_data beyond the
> i2c_id_table name (which has already been matched when probe()/ probe_new()
> is called), so strictly neither of_match_table nor apci_match_table would be
> necessary, because i2c DT/ ACPI enumeration also matches against i2c_table
> names.

Looking at the code I see still calls to acpi_match_data() and of_match_data().
Instead nowadays better to use device_get_match_data().

i2c_id_table should be removed from the module device table at least
(though you may continue to use it internally in the driver).

That's my understanding how it should be done.

With Best Regards,
Andy Shevchenko

 \ /
  Last update: 2018-07-02 18:14    [W:0.091 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site