Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1274374

Re: [PATCH v2] Input: atmel_mxt_ts - Add maxtouch to I2C table for module autoload

From Javier Martinez Canillas <javier@osg.samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] Input: atmel_mxt_ts - Add maxtouch to I2C table for module autoload
Date 2015-11-20 20:40 +0100
Message-ID <qwZHj-363-13@gated-at.bofh.it> (permalink)
References <qwZei-2Vw-17@gated-at.bofh.it> <qwZnY-2Zc-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] Input: atmel_mxt_ts - Add maxtouch to I2C table for module autoload Javier Martinez Canillas <javier@osg.samsung.com> - 2015-11-20 20:10 +0100
  Re: [PATCH v2] Input: atmel_mxt_ts - Add maxtouch to I2C table for  module autoload Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-11-20 20:20 +0100
    Re: [PATCH v2] Input: atmel_mxt_ts - Add maxtouch to I2C table for  module autoload Javier Martinez Canillas <javier@osg.samsung.com> - 2015-11-20 20:40 +0100
      Re: [PATCH v2] Input: atmel_mxt_ts - Add maxtouch to I2C table for  module autoload Javier Martinez Canillas <javier@osg.samsung.com> - 2015-11-20 20:50 +0100

csiph-web