lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <564F7550.1080300@osg.samsung.com>
Date:	Fri, 20 Nov 2015 16:32:32 -0300
From:	Javier Martinez Canillas <javier@....samsung.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	linux-kernel@...r.kernel.org, Nick Dyer <nick.dyer@...ev.co.uk>,
	linux-input@...r.kernel.org
Subject: Re: [PATCH v2] Input: atmel_mxt_ts - Add maxtouch to I2C table for
 module autoload

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ