This is a note to let you know that I've just added the patch titled spi: spidev: Add SPI ID table to the 5.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: spi-spidev-add-spi-id-table.patch and it can be found in the queue-5.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 6840615f85f6046039ebc4989870ddb12892b7fc Mon Sep 17 00:00:00 2001 From: Mark Brown <broonie@xxxxxxxxxx> Date: Thu, 23 Sep 2021 18:00:23 +0100 Subject: spi: spidev: Add SPI ID table From: Mark Brown <broonie@xxxxxxxxxx> commit 6840615f85f6046039ebc4989870ddb12892b7fc upstream. Currently autoloading for SPI devices does not use the DT ID table, it uses SPI modalises. Supporting OF modalises is going to be difficult if not impractical, an attempt was made but has been reverted, so ensure that module autoloading works for this driver by adding an id_table listing the SPI IDs for everything. Fixes: 96c8395e2166 ("spi: Revert modalias changes") Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Link: https://lore.kernel.org/r/20210923170023.1683-1-broonie@xxxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/spi/spidev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -673,6 +673,19 @@ static const struct file_operations spid static struct class *spidev_class; +static const struct spi_device_id spidev_spi_ids[] = { + { .name = "dh2228fv" }, + { .name = "ltc2488" }, + { .name = "sx1301" }, + { .name = "bk4" }, + { .name = "dhcom-board" }, + { .name = "m53cpld" }, + { .name = "spi-petra" }, + { .name = "spi-authenta" }, + {}, +}; +MODULE_DEVICE_TABLE(spi, spidev_spi_ids); + #ifdef CONFIG_OF static const struct of_device_id spidev_dt_ids[] = { { .compatible = "rohm,dh2228fv" }, @@ -819,6 +832,7 @@ static struct spi_driver spidev_spi_driv }, .probe = spidev_probe, .remove = spidev_remove, + .id_table = spidev_spi_ids, /* NOTE: suspend/resume methods are not necessary here. * We don't do anything except pass the requests to/from Patches currently in stable-queue which might be from broonie@xxxxxxxxxx are queue-5.14/spi-bcm-qspi-clear-mspi-spifie-interrupt-during-probe.patch queue-5.14/eeprom-93xx46-add-spi-device-id-table.patch queue-5.14/fpga-ice40-spi-add-spi-device-id-table.patch queue-5.14/spi-atmel-fix-pdc-transfer-setup-bug.patch queue-5.14/spi-spidev-add-spi-id-table.patch queue-5.14/gpio-74x164-add-spi-device-id-table.patch queue-5.14/eeprom-at25-add-spi-id-table.patch