From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: broonie@kernel.org, Marco Felsch <m.felsch@pengutronix.de>,
Andreas Schwab <schwab@suse.de>
Cc: linux-spi@vger.kernel.org, kernel@pengutronix.de
Subject: REGRESSION: "spi: add of_device_uevent_modalias support" and following "fix" breaks Macchiatobin
Date: Mon, 20 Sep 2021 11:20:29 +0100 [thread overview]
Message-ID: <YUhgbW8CiYI/rm+y@shell.armlinux.org.uk> (raw)
Hi,
Commit 3ce6c9e2617e ("spi: add of_device_uevent_modalias support")
prevents Macchiatobin auto-loading the spi-nor driver at boot.
Prior to this change, /sys/bus/spi/devices/spi4.0/uevent contained:
OF_COMPATIBLE_0=st,w25q32
OF_COMPATIBLE_N=1
MODALIAS=spi:w25q32
since the DT for this platform contains:
spi-flash@0 {
compatible = "st,w25q32";
which is entirely legal according to the binding documentation in
Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml.
The above referenced commit changes this to:
MODALIAS=of:Nspi-flashT(null)Cst,w25q32
However, the spi-nor module only supports these "of" modaliases:
alias: of:N*T*Cjedec,spi-norC*
alias: of:N*T*Cjedec,spi-nor
but supports _way_ more "spi" modaliases, including "spi:w25q32".
Therefore, this change breaks module autoloading.
A following commit e09f2ab8eecc ("spi: update modalias_show after
of_device_uevent_modalias support") also changed the
/sys/bus/spi/devices/spi4.0/modalias making a similar breaking change.
Hence there are two commits that may need to be reverted:
e09f2ab8eecc ("spi: update modalias_show after of_device_uevent_modalias support")
3ce6c9e2617e ("spi: add of_device_uevent_modalias support")
Alternatively, we need to add _all_ the flash types that the spi-nor
driver supports to the DT table, which sounds like a recipe for
disaster waiting to happen as it means maintaining two large tables of
flash devices, one for the SPI aliases with the flash information and
one for the DT aliases.
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next reply other threads:[~2021-09-20 10:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-20 10:20 Russell King (Oracle) [this message]
2021-09-20 18:33 ` REGRESSION: "spi: add of_device_uevent_modalias support" and following "fix" breaks Macchiatobin Mark Brown
2021-09-20 19:37 ` Russell King (Oracle)
2021-09-20 21:25 ` Mark Brown
2021-09-21 10:55 ` Russell King (Oracle)
2021-09-20 19:41 ` Andreas Schwab
2021-09-20 19:49 ` Russell King (Oracle)
2021-09-20 20:52 ` Mark Brown
2021-09-20 21:56 ` Andreas Schwab
2021-09-20 22:25 ` Linus Torvalds
2021-10-04 14:00 ` Andreas Schwab
2021-10-04 14:30 ` Mark Brown
2021-10-04 15:23 ` Andreas Schwab
2021-09-20 22:43 ` Russell King (Oracle)
2021-09-21 7:34 ` Andreas Schwab
2021-09-21 12:22 ` Mark Brown
2021-09-21 13:02 ` Andreas Schwab
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=YUhgbW8CiYI/rm+y@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=broonie@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-spi@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=schwab@suse.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).