bmips: backport b53 spi device tree patch
[openwrt/staging/noltari.git] / target / linux / bmips / patches-5.10 / 045-v5.13-net-dsa-b53-spi-allow-device-tree-probing.patch
1 From 6d16eadab6db0c1d61e59fee7ed1ecc2d10269be Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
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
9 Add missing of_match_table to allow device tree probing.
10
11 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
13 ---
14 drivers/net/dsa/b53/b53_spi.c | 13 +++++++++++++
15 1 file changed, 13 insertions(+)
16
17 --- a/drivers/net/dsa/b53/b53_spi.c
18 +++ b/drivers/net/dsa/b53/b53_spi.c
19 @@ -324,9 +324,22 @@ static int b53_spi_remove(struct spi_dev
20 return 0;
21 }
22
23 +static const struct of_device_id b53_spi_of_match[] = {
24 + { .compatible = "brcm,bcm5325" },
25 + { .compatible = "brcm,bcm5365" },
26 + { .compatible = "brcm,bcm5395" },
27 + { .compatible = "brcm,bcm5397" },
28 + { .compatible = "brcm,bcm5398" },
29 + { .compatible = "brcm,bcm53115" },
30 + { .compatible = "brcm,bcm53125" },
31 + { .compatible = "brcm,bcm53128" },
32 + { /* sentinel */ }
33 +};
34 +
35 static struct spi_driver b53_spi_driver = {
36 .driver = {
37 .name = "b53-switch",
38 + .of_match_table = b53_spi_of_match,
39 },
40 .probe = b53_spi_probe,
41 .remove = b53_spi_remove,