diff options
author | Christian Eggers <ceggers@arri.de> | 2020-11-20 12:21:07 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-25 17:53:45 -0800 |
commit | 8c4599f49841dd663402ec52325dc2233add1d32 (patch) | |
tree | 4cd07c7ff09b9000fdb8092df041d0362c5484d9 /drivers/net/dsa/microchip | |
parent | 9ed602bac97166ad816fbdd50c0788b53d8aa413 (diff) | |
download | linux-stable-8c4599f49841dd663402ec52325dc2233add1d32.tar.gz linux-stable-8c4599f49841dd663402ec52325dc2233add1d32.tar.bz2 linux-stable-8c4599f49841dd663402ec52325dc2233add1d32.zip |
net: dsa: microchip: ksz8795: 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/microchip')
-rw-r--r-- | drivers/net/dsa/microchip/ksz8795_spi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz8795_spi.c b/drivers/net/dsa/microchip/ksz8795_spi.c index 8b00f8e6c02f..f98432a3e2b5 100644 --- a/drivers/net/dsa/microchip/ksz8795_spi.c +++ b/drivers/net/dsa/microchip/ksz8795_spi.c @@ -49,6 +49,12 @@ static int ksz8795_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 = ksz8795_switch_register(dev); /* Main DSA driver may not be started yet. */ |