Commit 88362ebf authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller
Browse files

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: 96c8395e ("spi: Revert modalias changes")
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ebb87cc
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -349,6 +349,19 @@ static const struct of_device_id b53_spi_of_match[] = {
};
};
MODULE_DEVICE_TABLE(of, b53_spi_of_match);
MODULE_DEVICE_TABLE(of, b53_spi_of_match);


static const struct spi_device_id b53_spi_ids[] = {
	{ .name = "bcm5325" },
	{ .name = "bcm5365" },
	{ .name = "bcm5395" },
	{ .name = "bcm5397" },
	{ .name = "bcm5398" },
	{ .name = "bcm53115" },
	{ .name = "bcm53125" },
	{ .name = "bcm53128" },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(spi, b53_spi_ids);

static struct spi_driver b53_spi_driver = {
static struct spi_driver b53_spi_driver = {
	.driver = {
	.driver = {
		.name	= "b53-switch",
		.name	= "b53-switch",
@@ -357,6 +370,7 @@ static struct spi_driver b53_spi_driver = {
	.probe	= b53_spi_probe,
	.probe	= b53_spi_probe,
	.remove	= b53_spi_remove,
	.remove	= b53_spi_remove,
	.shutdown = b53_spi_shutdown,
	.shutdown = b53_spi_shutdown,
	.id_table = b53_spi_ids,
};
};


module_spi_driver(b53_spi_driver);
module_spi_driver(b53_spi_driver);