Skip to content

Commit 88362eb

Browse files
ffainellidavem330
authored andcommitted
net: dsa: b53: Add SPI 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 an id_table listing the SPI IDs for everything. Fixes: 96c8395 ("spi: Revert modalias changes") Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1ebb87c commit 88362eb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/net/dsa/b53/b53_spi.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,19 @@ static const struct of_device_id b53_spi_of_match[] = {
349349
};
350350
MODULE_DEVICE_TABLE(of, b53_spi_of_match);
351351

352+
static const struct spi_device_id b53_spi_ids[] = {
353+
{ .name = "bcm5325" },
354+
{ .name = "bcm5365" },
355+
{ .name = "bcm5395" },
356+
{ .name = "bcm5397" },
357+
{ .name = "bcm5398" },
358+
{ .name = "bcm53115" },
359+
{ .name = "bcm53125" },
360+
{ .name = "bcm53128" },
361+
{ /* sentinel */ }
362+
};
363+
MODULE_DEVICE_TABLE(spi, b53_spi_ids);
364+
352365
static struct spi_driver b53_spi_driver = {
353366
.driver = {
354367
.name = "b53-switch",
@@ -357,6 +370,7 @@ static struct spi_driver b53_spi_driver = {
357370
.probe = b53_spi_probe,
358371
.remove = b53_spi_remove,
359372
.shutdown = b53_spi_shutdown,
373+
.id_table = b53_spi_ids,
360374
};
361375

362376
module_spi_driver(b53_spi_driver);

0 commit comments

Comments
 (0)