diff options
author | Christian Eggers <ceggers@arri.de> | 2020-11-20 12:21:06 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-25 17:53:45 -0800 |
commit | 9ed602bac97166ad816fbdd50c0788b53d8aa413 (patch) | |
tree | f1df6e0269cfff71b6b0b4f723a35aae7d5e2180 /drivers/net/dsa | |
parent | 44e53c88828f2bb4cb53c7c35da10fcd70f3287d (diff) | |
download | linux-9ed602bac97166ad816fbdd50c0788b53d8aa413.tar.bz2 |
net: dsa: microchip: ksz9477: setup SPI mode
This should be done in the device driver instead of the device tree.
Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r-- | drivers/net/dsa/microchip/ksz9477_spi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz9477_spi.c b/drivers/net/dsa/microchip/ksz9477_spi.c index 1142768969c2..15bc11b3cda4 100644 --- a/drivers/net/dsa/microchip/ksz9477_spi.c +++ b/drivers/net/dsa/microchip/ksz9477_spi.c @@ -48,6 +48,12 @@ static int ksz9477_spi_probe(struct spi_device *spi) if (spi->dev.platform_data) dev->pdata = spi->dev.platform_data; + /* setup spi */ + spi->mode = SPI_MODE_3; + ret = spi_setup(spi); + if (ret) + return ret; + ret = ksz9477_switch_register(dev); /* Main DSA driver may not be started yet. */ |