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]
Date:	Thu, 11 Sep 2014 10:00:29 +0200
From:	Sjoerd Simons <sjoerd.simons@...labora.co.uk>
To:	Lee Jones <lee.jones@...aro.org>, Wolfram Sang <wsa@...-dreams.de>
Cc:	Javier Martinez Canillas <javier.martinez@...labora.co.uk>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Nick Dyer <nick.dyer@...ev.co.uk>, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH] Input: atmel_mxt_ts: Add of node type to the i2c table

Hey Lee,

On Wed, 2014-09-10 at 10:28 +0100, Lee Jones wrote:
> On Tue, 09 Sep 2014, Javier Martinez Canillas wrote:
> 
> > [adding Lee Jones to cc list since I'm referring on a series he posted]
> > 
> > Hello Sjoerd,
> > 
> > On 09/09/2014 09:52 AM, Sjoerd Simons wrote:
> > > For i2c devices in OF the modalias exposed to userspace is i2c:<node
> > > type>, for the Maxtouch driver this is i2c:maxtouch.
> > > 
> > > Add maxtouch to the i2c id table such that userspace can correctly
> > > load the module for the device and drop the OF table as it's not
> > > needed for i2c devices.
> > > 
> > > Signed-off-by: Sjoerd Simons <sjoerd.simons@...labora.co.uk>
> > > ---
> > >  drivers/input/touchscreen/atmel_mxt_ts.c | 8 +-------
> > >  1 file changed, 1 insertion(+), 7 deletions(-)
> > > 
> > > diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
> > > index db178ed..57ff26d 100644
> > > --- a/drivers/input/touchscreen/atmel_mxt_ts.c
> > > +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
> > > @@ -2267,16 +2267,11 @@ static int mxt_resume(struct device *dev)
> > >  
> > >  static SIMPLE_DEV_PM_OPS(mxt_pm_ops, mxt_suspend, mxt_resume);
> > >  
> > > -static const struct of_device_id mxt_of_match[] = {
> > > -	{ .compatible = "atmel,maxtouch", },
> > > -	{},
> > > -};
> > > -MODULE_DEVICE_TABLE(of, mxt_of_match);
> > > -
> > >  static const struct i2c_device_id mxt_id[] = {
> > >  	{ "qt602240_ts", 0 },
> > >  	{ "atmel_mxt_ts", 0 },
> > >  	{ "atmel_mxt_tp", 0 },
> > > +	{ "maxtouch", 0 },
> > >  	{ "mXT224", 0 },
> > >  	{ }
> > >  };
> > > @@ -2286,7 +2281,6 @@ static struct i2c_driver mxt_driver = {
> > >  	.driver = {
> > >  		.name	= "atmel_mxt_ts",
> > >  		.owner	= THIS_MODULE,
> > > -		.of_match_table = of_match_ptr(mxt_of_match),
> > >  		.pm	= &mxt_pm_ops,
> > >  	},
> > >  	.probe		= mxt_probe,
> > > 
> > 
> > I see that Lee is working to allow the I2C subsystem to not need an I2C ID
> > table to match [0]. I'll let Lee to comment what the future plans are and if
> > his series are going to solve your issue since I'm not that familiar with the
> > I2C core.
> 
> It's wrong to expect DT to probe these devices without a compatible
> string.  It does so at the moment, but this is a bi-product and not
> the correct method.

Ok, which means removing the mxt_of_match table in this patch is wrong..
I'll fix that for for a V2.

However that makes adding the "maxtouch" string to the i2c device table
somewhat cumbersome as it only gets added in this case to ensure
module-autoloading can happen as the modalias presented to userspace is
going still going to be i2c:maxtouch.

Tbh, the bigger problem this is pointing out is that for I2C devices
with only an OF compability tring module auto-loading is broken...

-- 
Sjoerd Simons <sjoerd.simons@...labora.co.uk>
Collabora Ltd.

Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (6170 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ