From: Marco Felsch <m.felsch@pengutronix.de>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH v1] spi: add of_device_uevent_modalias support
Date: Wed, 9 Jun 2021 10:07:22 +0200 [thread overview]
Message-ID: <20210609080722.36slsf7xr36ydv2y@pengutronix.de> (raw)
In-Reply-To: <20210604154530.GE4045@sirena.org.uk>
On 21-06-04 16:45, Mark Brown wrote:
> On Tue, May 25, 2021 at 11:10:03AM +0200, Marco Felsch wrote:
> > Add OF support as already done for ACPI to take driver
> > MODULE_DEVICE_TABLE(of, ..) into account.
> >
> > For example with this change a spi nor device MODALIAS changes from:
> >
> > MODALIAS=spi:spi-nor
> >
> > to
> >
> > MODALIAS=of:Nspi-flashT(null)Cjedec,spi-nor
>
> Will this break existing userspace?
No, if I understood the mechanism correctly.
The MODULE_DEVICE_TABLE(of, ..) and the MODULE_DEVICE_TABLE(spi, ..)
should equal except for the "vendor," prefix used by the
MODULE_DEVICE_TABLE(of, ..). If a driver don't support
MODULE_DEVICE_TABLE(of, ..) we fallback to the
MODULE_DEVICE_TABLE(spi, ..).
I would instead say that it fixes at least the spi-nor usage e.g.
spi-nor@0 {
compatible = "vendor,product", "jedec,spi-nor";
}
is a common OF usage: the compatible list goes from the exact compatible
to the least common compatible. Here I should fix my commit message
which should include this line:
"MODALIAS=of:Nspi-flashT(null)Cwinbond,w25q16dwCjedec,spi-nor".
Anyway this scenario don't work for spi-nor driver since the spi-core
only take the MODULE_DEVICE_TABLE(spi, ..) into account. So the
compatible must not include the "vendor,product" compatible.
With my change in place we can specify the 'complete' compatible list.
Regards,
Marco
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2021-06-09 8:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 9:10 [PATCH v1] spi: add of_device_uevent_modalias support Marco Felsch
2021-06-04 15:45 ` Mark Brown
2021-06-09 8:07 ` Marco Felsch [this message]
2021-06-15 12:06 ` Mark Brown
2021-07-22 13:48 ` [PATCH] spi: update modalias_show after " Andreas Schwab
2021-07-22 14:06 ` Mark Brown
2021-07-22 17:09 ` Mark Brown
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=20210609080722.36slsf7xr36ydv2y@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=broonie@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-spi@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 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).