* [PATCH net] net: dsa: b53: Add SPI ID table
@ 2021-12-02 4:17 Florian Fainelli
2021-12-02 13:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2021-12-02 4:17 UTC (permalink / raw)
To: netdev
Cc: broonie, Florian Fainelli, Andrew Lunn, Vivien Didelot,
Vladimir Oltean, David S. Miller, Jakub Kicinski, open list
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: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/dsa/b53/b53_spi.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/dsa/b53/b53_spi.c b/drivers/net/dsa/b53/b53_spi.c
index 01e37b75471e..2b88f03e5252 100644
--- a/drivers/net/dsa/b53/b53_spi.c
+++ b/drivers/net/dsa/b53/b53_spi.c
@@ -349,6 +349,19 @@ static const struct of_device_id 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 = {
.driver = {
.name = "b53-switch",
@@ -357,6 +370,7 @@ static struct spi_driver b53_spi_driver = {
.probe = b53_spi_probe,
.remove = b53_spi_remove,
.shutdown = b53_spi_shutdown,
+ .id_table = b53_spi_ids,
};
module_spi_driver(b53_spi_driver);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: dsa: b53: Add SPI ID table
2021-12-02 4:17 [PATCH net] net: dsa: b53: Add SPI ID table Florian Fainelli
@ 2021-12-02 13:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-02 13:10 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, broonie, andrew, vivien.didelot, olteanv, davem, kuba,
linux-kernel
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Wed, 1 Dec 2021 20:17:20 -0800 you wrote:
> 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: Florian Fainelli <f.fainelli@gmail.com>
>
> [...]
Here is the summary with links:
- [net] net: dsa: b53: Add SPI ID table
https://git.kernel.org/netdev/net/c/88362ebfd7fb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-02 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-02 4:17 [PATCH net] net: dsa: b53: Add SPI ID table Florian Fainelli
2021-12-02 13:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).