Skip to content

Commit 6d16ead

Browse files
Noltaridavem330
authored andcommitted
net: dsa: b53: spi: allow device tree probing
Add missing of_match_table to allow device tree probing. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1bf3436 commit 6d16ead

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎drivers/net/dsa/b53/b53_spi.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,22 @@ static int b53_spi_remove(struct spi_device *spi)
324324
return 0;
325325
}
326326

327+
static const struct of_device_id b53_spi_of_match[] = {
328+
{ .compatible = "brcm,bcm5325" },
329+
{ .compatible = "brcm,bcm5365" },
330+
{ .compatible = "brcm,bcm5395" },
331+
{ .compatible = "brcm,bcm5397" },
332+
{ .compatible = "brcm,bcm5398" },
333+
{ .compatible = "brcm,bcm53115" },
334+
{ .compatible = "brcm,bcm53125" },
335+
{ .compatible = "brcm,bcm53128" },
336+
{ /* sentinel */ }
337+
};
338+
327339
static struct spi_driver b53_spi_driver = {
328340
.driver = {
329341
.name = "b53-switch",
342+
.of_match_table = b53_spi_of_match,
330343
},
331344
.probe = b53_spi_probe,
332345
.remove = b53_spi_remove,

0 commit comments

Comments
 (0)