All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	linux-input@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] input: touchscreen: edt-ft5x06: fix driver autoprobing
Date: Tue, 18 Nov 2014 14:03:40 -0600	[thread overview]
Message-ID: <20141118200340.GP6179@saruman> (raw)
In-Reply-To: <20141118195902.GF3003@dtor-ws>

[-- Attachment #1: Type: text/plain, Size: 2660 bytes --]

On Tue, Nov 18, 2014 at 11:59:02AM -0800, Dmitry Torokhov wrote:
> On Tue, Nov 18, 2014 at 01:27:42PM -0600, Felipe Balbi wrote:
> > Because with OF we can pass more specific
> > compatible flags (such as edt-ft5306) instead
> > of generic edt-ft5x06, when i2c-core's
> > of_i2c_register_devices() tries to request_module(),
> > it'll request it with a non-existent specific module
> > alias.
> > 
> > In order to have this driver autoprobing again, we
> > just need to add missing MODULE_ALIAS() entries to
> > edt-ft5x06 driver.
> > 
> > Thanks to Dmitry for noticing that it actually should
> > autoprobe even with of_device_id.
> > 
> > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Cc: <linux-input@vger.kernel.org>
> > Cc: <stable@vger.kernel.org> # v3.15+
> > Fixes: dac90dc2 (Input: edt-ft5x06 - add DT support)
> > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > ---
> >  drivers/input/touchscreen/edt-ft5x06.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
> > index ee3434f..bcbf688 100644
> > --- a/drivers/input/touchscreen/edt-ft5x06.c
> > +++ b/drivers/input/touchscreen/edt-ft5x06.c
> > @@ -1147,6 +1147,9 @@ static struct i2c_driver edt_ft5x06_ts_driver = {
> >  
> >  module_i2c_driver(edt_ft5x06_ts_driver);
> >  
> > +MODULE_ALIAS("i2c:edt-ft5206");
> > +MODULE_ALIAS("i2c:edt-ft5306");
> > +MODULE_ALIAS("i2c:edt-ft5406");
> >  MODULE_AUTHOR("Simon Budig <simon.budig@kernelconcepts.de>");
> >  MODULE_DESCRIPTION("EDT FT5x06 I2C Touchscreen Driver");
> >  MODULE_LICENSE("GPL");
> > -- 
> > 2.1.0.GIT
> > 
> 
> Here is what I see if I run modinfo on the module:
> 
> dtor@dtor-ws:~/kernel/work$ modinfo
> drivers/input/touchscreen/edt-ft5x06.ko
> filename:
> /home/dtor/kernel/work/drivers/input/touchscreen/edt-ft5x06.ko
> license:        GPL
> description:    EDT FT5x06 I2C Touchscreen Driver
> author:         Simon Budig <simon.budig@kernelconcepts.de>
> alias:          i2c:edt-ft5x06
> alias:          of:N*T*Cedt,edt-ft5406*
> alias:          of:N*T*Cedt,edt-ft5306*
> alias:          of:N*T*Cedt,edt-ft5206*
> depends:        i2c-core
> intree:         Y
> vermagic:       3.17.0+ SMP preempt mod_unload 
> 
> As you can see we already have what I consider proper modaliases for the
> driver. Why don't they work? Is it because modprobe doe snot know how to
> handle OF-style modaliases or device's uevents are missing OF data in
> them?

no, it's because i2c call request_module for i2c:edt-ft5306. i2c core
never uses any of the of aliases.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-11-18 20:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18 18:06 [PATCH 01/10] arm: omap: omap2plus_defconfig: remove unwanted ethernet drivers Felipe Balbi
2014-11-18 18:06 ` Felipe Balbi
2014-11-18 18:07 ` [PATCH 02/10] arm: omap: omap2plus_defconfig: enable EDT FT5X06 touchscreen Felipe Balbi
2014-11-18 18:07   ` Felipe Balbi
2014-11-18 18:07 ` [PATCH 03/10] arm: omap: omap2plus_defconfig: enable AM33XX SoC sound Felipe Balbi
2014-11-18 18:07   ` Felipe Balbi
2014-11-18 18:07 ` [PATCH 04/10] arm: omap: omap2plus_defconfig: enable XHCI Felipe Balbi
2014-11-18 18:07   ` Felipe Balbi
2014-11-18 18:07 ` [PATCH 05/10] arm: omap: omap2plus_defconfig: enable ECAP and EHRPWM Felipe Balbi
2014-11-18 18:07   ` Felipe Balbi
2014-11-22  0:31   ` Tony Lindgren
2014-11-22  0:31     ` Tony Lindgren
2014-11-18 18:07 ` [PATCH 06/10] input: touchscreen: edt-ft5x06: fix driver autoprobing Felipe Balbi
2014-11-18 18:07   ` Felipe Balbi
2014-11-18 18:38   ` Dmitry Torokhov
2014-11-18 18:38     ` Dmitry Torokhov
2014-11-18 19:09     ` Felipe Balbi
2014-11-18 19:09       ` Felipe Balbi
2014-11-18 19:21       ` Felipe Balbi
2014-11-18 19:21         ` Felipe Balbi
2014-11-18 19:27         ` [PATCH v2] " Felipe Balbi
2014-11-18 19:37           ` Felipe Balbi
2014-11-18 19:59           ` Dmitry Torokhov
2014-11-18 20:03             ` Felipe Balbi [this message]
2014-11-18 20:14               ` Dmitry Torokhov
2014-11-18 20:19                 ` Felipe Balbi
2014-11-22  1:05                   ` Felipe Balbi
2014-11-22  9:06                     ` Wolfram Sang
2014-11-18 18:07 ` [PATCH 07/10] arm: boot: dts: am437x-sk: switch over to new edt-ft5306 compatible Felipe Balbi
2014-11-18 18:07   ` Felipe Balbi
2014-11-18 18:07 ` [PATCH 08/10] arm: boot: dts: imx28-tx28: switch over to new edt-ft5x06 compatible Felipe Balbi
2014-11-18 18:07   ` Felipe Balbi
2014-11-18 18:07 ` [PATCH 09/10] arm: boot: dts: imx53-tx53-x03x: " Felipe Balbi
2014-11-18 18:07   ` Felipe Balbi
2014-11-18 18:07 ` [PATCH 10/10] arm: boot: dts: imx6qdl-tx6: " Felipe Balbi
2014-11-18 18:07   ` Felipe Balbi

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=20141118200340.GP6179@saruman \
    --to=balbi@ti.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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.