diff options
author | Jonas Gorski <jonas.gorski@gmail.com> | 2017-02-09 21:20:41 +0100 |
---|---|---|
committer | Jonas Gorski <jonas.gorski@gmail.com> | 2017-06-10 12:40:38 +0200 |
commit | 5df15c06ccd105a19431bc32bd1d158b3ff3325e (patch) | |
tree | d47eee3a3f9f18a36fe9c5fe6913edfe9e4760a2 /target/linux/generic/files/drivers/net/phy/b53/b53_spi.c | |
parent | 9ceeaf4c6cac6e5ff5a5225a5c9d13ba63d9c478 (diff) |
b53: allow configuration through device tree
Add support for the same binding as upstream b53 to allow an
easy switch.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/b53/b53_spi.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/b53/b53_spi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c b/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c index 469a8ddde3..efc8f7ee89 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c @@ -21,6 +21,7 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/spi/spi.h> +#include <linux/of.h> #include <linux/platform_data/b53.h> #include "b53_priv.h" @@ -313,11 +314,24 @@ static int b53_spi_remove(struct spi_device *spi) return 0; } +static const struct of_device_id b53_of_match[] = { + { .compatible = "brcm,bcm5325" }, + { .compatible = "brcm,bcm53115" }, + { .compatible = "brcm,bcm53125" }, + { .compatible = "brcm,bcm53128" }, + { .compatible = "brcm,bcm5365" }, + { .compatible = "brcm,bcm5395" }, + { .compatible = "brcm,bcm5397" }, + { .compatible = "brcm,bcm5398" }, + { /* sentinel */ }, +}; + static struct spi_driver b53_spi_driver = { .driver = { .name = "b53-switch", .bus = &spi_bus_type, .owner = THIS_MODULE, + .of_match_table = b53_of_match, }, .probe = b53_spi_probe, .remove = b53_spi_remove, |