Skip to content

Commit

Permalink
net: dsa: microchip: ksz8795: setup SPI mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ceggers-arri authored and kuba-moo committed Nov 26, 2020
1 parent 9ed602b commit 8c4599f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/dsa/microchip/ksz8795_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 8c4599f

Please sign in to comment.