All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Nick Dyer <nick.dyer@itdev.co.uk>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH] Input: atmel_mxt_ts: Add of node type to the i2c table
Date: Wed, 10 Sep 2014 10:28:32 +0100	[thread overview]
Message-ID: <20140910092832.GM30307@lee--X1> (raw)
In-Reply-To: <540ED495.20609@collabora.co.uk>

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@collabora.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.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Nick Dyer <nick.dyer@itdev.co.uk>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH] Input: atmel_mxt_ts: Add of node type to the i2c table
Date: Wed, 10 Sep 2014 10:28:32 +0100	[thread overview]
Message-ID: <20140910092832.GM30307@lee--X1> (raw)
In-Reply-To: <540ED495.20609@collabora.co.uk>

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@collabora.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.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-09-10  9:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09  7:52 [PATCH] Input: atmel_mxt_ts: Add of node type to the i2c table Sjoerd Simons
2014-09-09 10:21 ` Javier Martinez Canillas
2014-09-09 10:29   ` Nick Dyer
2014-09-09 10:54     ` Sjoerd Simons
2014-09-10  9:28   ` Lee Jones [this message]
2014-09-10  9:28     ` Lee Jones
2014-09-11  8:00     ` Sjoerd Simons
2014-09-11  8:38       ` Javier Martinez Canillas
2014-09-11  9:19         ` Nick Dyer
2014-09-11  9:54           ` Javier Martinez Canillas
2014-09-11 11:08           ` Wolfram Sang
2014-09-11 11:24             ` Javier Martinez Canillas
2014-09-11 11:35               ` Wolfram Sang
2014-09-11 11:41                 ` Javier Martinez Canillas
2014-09-11 12:24                   ` Nick Dyer
2014-09-09 12:36 ` Nick Dyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140910092832.GM30307@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=javier.martinez@collabora.co.uk \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=nick.dyer@itdev.co.uk \
    --cc=sjoerd.simons@collabora.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.