Hello Dmitry, On 11/20/2015 04:15 PM, Dmitry Torokhov wrote: > On Fri, Nov 20, 2015 at 04:09:42PM -0300, Javier Martinez Canillas wrote: >> The Atmel maxtouch DT binding documents that the compatible string for >> the device is "atmel,maxtouch" and the I2C core always reports a module >> alias of the form i2c:alias where alias is the compatible string model: >> >> $ grep MODALIAS /sys/devices/platform/12e00000.i2c/i2c-8/8-004b/uevent >> MODALIAS=i2c:maxtouch > > Do we know why we are not reporting modalias as "of:..." so that > autoloading using the of table works properly? > Yes we do but is not that easy to fix without risking breaking autload in a lot of drivers that are relying on the current behavior. I posted a patch series to fix the OF and I2C tables for all the drivers that could find in mainline and in the cover letter I explain the problem in detail: https://lkml.org/lkml/2015/7/30/519 But is not complete because the .driver_data in i2c_device_id is an kernel_ulong_t while the .data in of_device_id is a const void * so some casting will be needed to add an OF table in some drivers that still lack one and I wanted to discuss that a little bit to see if the I2C core could return a common data field in both cases. > It sounds like the of matching and modalias is quite a mess at the > moment. > Agreed, I2C is specially complicated because not only OF drivers need a I2C table for module autoloading but also the core uses the I2C table to match devices and pass a struct i2c_device_id to their probe function. Now this requirement has become more relaxed since Lee's series mentioned in my cover letter were merged but still most I2C drivers use an I2C table for this legacy reason. So there isn't too much gain in cleaning up the modalias reporting if most drivers still need an I2C table anyways. > Thanks. > Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html