Re: [PATCHv7 10/11] mfd: as3722: Rid driver of superfluous I2C device ID structure

From: Javier Martinez Canillas
Date: Mon Nov 07 2016 - 21:15:17 EST

Hello Wolfram,

On 11/07/2016 08:09 PM, Wolfram Sang wrote:
>> Remember that i2c_device_uevent() always reports modalias of the form
>> MODALIAS=i2c:<foo> even when your series allows to match without a I2C
>> device ID table.
> Not always. Can't we do something similar like ACPI does with

Right, I meant that it always report a platform I2C modalias for both OF
and legacy platform data I2C device registration mechanisms.

> acpi_device_uevent_modalias()?

Yes, doing that is trivial. I posted a RFC patch about a year ago that
changes i2c_device_uevent() to report a proper OF modalias [0] as a part
of a series that fixed module autoload in a bunch of I2C drivers [1].

What's tricky is to make sure that the change won't introduce regressions
in current I2C drivers. I enumerated the possible issues if the I2C core
starts reporting OF modaliases and fixed some of them in the same series.

> I mean the whole point of this series is to remove the need of having an
> I2C device ID table...

Agreed, one of the issues was that the I2C table was needed anyways for
the core to match and pass a struct i2c_device_id to the probe's function.

This series solves that so once it lands, I plan to address the possible
issues in the I2C drivers and re-send [0] as a proper patch.


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