740-v5.13-0002-net-dsa-b53-spi-allow-device-tree-probing.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From 6d16eadab6db0c1d61e59fee7ed1ecc2d10269be Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <[email protected]>
  3. Date: Mon, 15 Mar 2021 15:14:23 +0100
  4. Subject: [PATCH] net: dsa: b53: spi: allow device tree probing
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Add missing of_match_table to allow device tree probing.
  9. Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  10. Signed-off-by: David S. Miller <[email protected]>
  11. ---
  12. drivers/net/dsa/b53/b53_spi.c | 13 +++++++++++++
  13. 1 file changed, 13 insertions(+)
  14. --- a/drivers/net/dsa/b53/b53_spi.c
  15. +++ b/drivers/net/dsa/b53/b53_spi.c
  16. @@ -324,9 +324,22 @@ static int b53_spi_remove(struct spi_dev
  17. return 0;
  18. }
  19. +static const struct of_device_id b53_spi_of_match[] = {
  20. + { .compatible = "brcm,bcm5325" },
  21. + { .compatible = "brcm,bcm5365" },
  22. + { .compatible = "brcm,bcm5395" },
  23. + { .compatible = "brcm,bcm5397" },
  24. + { .compatible = "brcm,bcm5398" },
  25. + { .compatible = "brcm,bcm53115" },
  26. + { .compatible = "brcm,bcm53125" },
  27. + { .compatible = "brcm,bcm53128" },
  28. + { /* sentinel */ }
  29. +};
  30. +
  31. static struct spi_driver b53_spi_driver = {
  32. .driver = {
  33. .name = "b53-switch",
  34. + .of_match_table = b53_spi_of_match,
  35. },
  36. .probe = b53_spi_probe,
  37. .remove = b53_spi_remove,