public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-kernel@vger.kernel.org, Nick Dyer <nick.dyer@itdev.co.uk>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH v2] Input: atmel_mxt_ts - Add maxtouch to I2C table for module autoload
Date: Fri, 20 Nov 2015 16:32:32 -0300	[thread overview]
Message-ID: <564F7550.1080300@osg.samsung.com> (raw)
In-Reply-To: <20151120191558.GD26895@dtor-ws>

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

  reply	other threads:[~2015-11-20 19:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 19:09 [PATCH v2] Input: atmel_mxt_ts - Add maxtouch to I2C table for module autoload Javier Martinez Canillas
2015-11-20 19:15 ` Dmitry Torokhov
2015-11-20 19:32   ` Javier Martinez Canillas [this message]
2015-11-20 19:46     ` Javier Martinez Canillas
2015-12-02 20:15       ` Javier Martinez Canillas
2015-12-10 23:07   ` Javier Martinez Canillas
2015-12-11 21:24     ` Dmitry Torokhov

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=564F7550.1080300@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick.dyer@itdev.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox