Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: 74x164: Add SPI device ID table

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 a SPI device ID table.

Fixes: 96c8395e2166 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>

authored by

Mark Brown and committed by
Bartosz Golaszewski
be449183 9e1ff307

+8
+8
drivers/gpio/gpio-74x164.c
··· 174 174 return 0; 175 175 } 176 176 177 + static const struct spi_device_id gen_74x164_spi_ids[] = { 178 + { .name = "74hc595" }, 179 + { .name = "74lvc594" }, 180 + {}, 181 + }; 182 + MODULE_DEVICE_TABLE(spi, gen_74x164_spi_ids); 183 + 177 184 static const struct of_device_id gen_74x164_dt_ids[] = { 178 185 { .compatible = "fairchild,74hc595" }, 179 186 { .compatible = "nxp,74lvc594" }, ··· 195 188 }, 196 189 .probe = gen_74x164_probe, 197 190 .remove = gen_74x164_remove, 191 + .id_table = gen_74x164_spi_ids, 198 192 }; 199 193 module_spi_driver(gen_74x164_driver); 200 194