OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ed602b
)
net: dsa: microchip: ksz8795: setup SPI mode
author
Christian Eggers
<ceggers@arri.de>
Fri, 20 Nov 2020 11:21:07 +0000
(12:21 +0100)
committer
Jakub Kicinski
<kuba@kernel.org>
Thu, 26 Nov 2020 01:53:45 +0000
(17:53 -0800)
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>
drivers/net/dsa/microchip/ksz8795_spi.c
patch
|
blob
|
history
diff --git
a/drivers/net/dsa/microchip/ksz8795_spi.c
b/drivers/net/dsa/microchip/ksz8795_spi.c
index
8b00f8e
..
f98432a
100644
(file)
--- 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. */