Skip to content

Commit be44918

Browse files
brooniebrgl
authored andcommitted
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: 96c8395 ("spi: Revert modalias changes") Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 9e1ff30 commit be44918

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpio/gpio-74x164.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ static int gen_74x164_remove(struct spi_device *spi)
174174
return 0;
175175
}
176176

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+
177184
static const struct of_device_id gen_74x164_dt_ids[] = {
178185
{ .compatible = "fairchild,74hc595" },
179186
{ .compatible = "nxp,74lvc594" },
@@ -188,6 +195,7 @@ static struct spi_driver gen_74x164_driver = {
188195
},
189196
.probe = gen_74x164_probe,
190197
.remove = gen_74x164_remove,
198+
.id_table = gen_74x164_spi_ids,
191199
};
192200
module_spi_driver(gen_74x164_driver);
193201

0 commit comments

Comments
 (0)