REGRESSION: "spi: add of_device_uevent_modalias support" and following "fix" breaks Macchiatobin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux