From: Javier Martinez Canillas <javier@dowhile0.org>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Linux I2C <linux-i2c@vger.kernel.org>,
Javier Martinez Canillas <javierm@redhat.com>
Subject: Re: [PATCH] i2c: core: report OF style module alias for devices registered via OF
Date: Sun, 7 Jan 2018 14:17:14 +0100 [thread overview]
Message-ID: <CABxcv=nQpd-RPPzWbCpdWQjK7VzZyXtWSCTB3JHBA-uLygoC+A@mail.gmail.com> (raw)
In-Reply-To: <20171203214050.11482-1-javierm@redhat.com>
Hello Wolfram,
On Sun, Dec 3, 2017 at 10:40 PM, Javier Martinez Canillas
<javierm@redhat.com> wrote:
> The buses should honor the firmware interface used to register the device,
> but the I2C core reports a MODALIAS of the form i2c:<device> even for I2C
> devices registered via OF.
>
> This means that user-space will never get an OF stype uevent MODALIAS even
> when the drivers modules contain aliases exported from both the I2C and OF
> device ID tables. For example, an Atmel maXTouch Touchscreen registered by
> a DT node with compatible "atmel,maxtouch" has the following module alias:
>
> $ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias
> i2c:maxtouch
>
> So udev won't be able to auto-load a module for an OF-only device driver.
> Many OF-only drivers duplicate the OF device ID table entries in an I2C ID
> table only has a workaround for how the I2C core reports the module alias.
>
> This patch changes the I2C core to report an OF related MODALIAS uevent if
> the device was registered via OF. So for the previous example, after this
> patch, the reported MODALIAS for the Atmel maXTouch will be the following:
>
> $ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias
> of:NtrackpadT<NULL>Catmel,maxtouch
>
> NOTE: This patch may break out-of-tree drivers that were relying on this
> behavior, and only had an I2C device ID table even when the device
> was registered via OF. There are no remaining drivers in mainline
> that do this, but out-of-tree drivers have to be fixed and define
> a proper OF device ID table to have module auto-loading working.
>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
Any comments on this patch?
Best regards,
Javier
next prev parent reply other threads:[~2018-01-07 13:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-03 21:40 [PATCH] i2c: core: report OF style module alias for devices registered via OF Javier Martinez Canillas
2018-01-07 13:17 ` Javier Martinez Canillas [this message]
2018-03-05 11:00 ` Javier Martinez Canillas
2018-03-05 15:30 ` Wolfram Sang
2018-03-05 17:09 ` Javier Martinez Canillas
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='CABxcv=nQpd-RPPzWbCpdWQjK7VzZyXtWSCTB3JHBA-uLygoC+A@mail.gmail.com' \
--to=javier@dowhile0.org \
--cc=javierm@redhat.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).