lkml.org 
[lkml]   [2017]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] mfd: tps65217: Introduce dependency on CONFIG_OF
On Fri, Jun 9, 2017 at 1:18 AM, Keerthy <j-keerthy@ti.com> wrote:

[snip]

>>
>>>>
>>>> -static const struct i2c_device_id tps65217_id_table[] = {
>>>> - {"tps65217", TPS65217},
>>>> - { /* sentinel */ }
>>>> -};
>>>> -MODULE_DEVICE_TABLE(i2c, tps65217_id_table);
>>
>> Unfortunately you can't get rid of this table (yet) since the I2C
>> subsystem always reports a MODALIAS of the form "i2c:tps65217" even
>> when the devices have been registered via OF. There are only a couple
>> of drivers more to clean-up and then I'll post a patch that fixes the
>> I2C core to report a proper OF modalias. But for now, removing will
>> mean that module autoload will be broken for this driver.
>
> So this means whole logic of probe_new without i2c_device_id is not
> ready? I will have to revert all that logic right?
>

No, that's not what I meant.

It's absolutely correct for drivers that can't be build as a module
(i.e: have a boolean instead of tristate Kconfig symbol) or if you
want to get rid of the struct i2c_device_id pointed passed to your
probe callback since isn't used in the driver.

But it's not enough to get rid of the struct i2c_device_id table for
the reason I mentioned before.

> Lee Jones,
>
> Does that mean even for LP87565 driver we need MODULE_DEVICE_TABLE for
> module autoload?
>

I guess you are talking about [0], right?

Yes, it's needed because the driver can be built as a module.

[0]: https://lkml.org/lkml/2017/5/19/394

Best regards,
Javier

\
 
 \ /
  Last update: 2017-06-12 01:38    [W:0.140 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site