All of lore.kernel.org
 help / color / mirror / Atom feed
* REGRESSION: "spi: add of_device_uevent_modalias support" and following "fix" breaks Macchiatobin
@ 2021-09-20 10:20 Russell King (Oracle)
  2021-09-20 18:33 ` Mark Brown
  2021-09-20 19:41 ` Andreas Schwab
  0 siblings, 2 replies; 17+ messages in thread
From: Russell King (Oracle) @ 2021-09-20 10:20 UTC (permalink / raw)
  To: broonie, Marco Felsch, Andreas Schwab; +Cc: linux-spi, kernel

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!

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-10-04 15:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 10:20 REGRESSION: "spi: add of_device_uevent_modalias support" and following "fix" breaks Macchiatobin Russell King (Oracle)
2021-09-20 18:33 ` 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

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.