Re: [PATCH 4/4] eeprom: at24: Add OF device ID table

From: Javier Martinez Canillas
Date: Wed Mar 15 2017 - 07:41:21 EST


Hello Andy,

On 03/15/2017 08:21 AM, Andy Shevchenko wrote:
> On Wed, Mar 15, 2017 at 12:58 PM, Javier Martinez Canillas
> <javier@xxxxxxxxxxxxxxx> wrote:
>> On 03/15/2017 04:58 AM, Wolfram Sang wrote:
>
>> Unfortunately some maintainers do and don't accept patches adding I2C tables
>> only to have module autoloading working so I still think it should be fixed.
>
> Wait, how does it work for now?!
>

It only works if you have an I2C device ID table, but that may not be the case
for DT-only drivers that could only have an OF device ID table. In the latter
case module autoload won't work.

> Sounds for me you are trying to solve non-existing issue.
>

It's an existing issue. You _must_ have an I2C device ID table if you want to
autload a device driver which is superfluous for DT-only drivers.

In other words, if you register an I2C device using OF the modalias will be:

$ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias
i2c:maxtouch

While the correct thing to report should be:

$ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias
of:NtrackpadT<NULL>Catmel,maxtouch

>> [0]: https://patchwork.kernel.org/patch/6903991/
>

Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America