net/libertas: remove GPIO-CS handling in SPI interface code
PATCH v2 1/1 net/libertas: remove GPIO-CS handling in SPI interface code
This removes the dependency on GPIO framework and lets the SPI host driver handle the chip select. The SPI host driver is required to keep the CS active for the entire message unless cs_change says otherwise. This patch collects the two/three single SPI transfers into a message. Also the delay in read path in case use_dummy_writes are not used is moved into the SPI host driver.
Tested-by Mike Rapoport <[email protected]>
Tested-by Andrey Yurovsky <[email protected]>
Signed-off-by Sebastian Andrzej Siewior <[email protected]>
---
The only change I've made since v1 is that I've replaced
+ reg_trans.delay_usecs = (100 + (delay * 10)) / 1000;
with
+ reg_trans.delay_usecs =
+ DIV_ROUND_UP((100 + (delay * 10)), 1000);
The latter should not end up with delay_usecs = 0 if delay is < 90
drivers/net/wireless/Kconfig | 2 +- drivers/net/wireless/libertas/if_spi.c | 92 +++++++++++++++----------------- 2 files changed, 45 insertions(+), 49 deletions(-)
drivers/net/wireless/Kconfig +1 -1
@@ -153,7 +153,7 @@ config LIBERTAS_SDIO config LIBERTAS_SPI tristate "Marvell Libertas 8686 SPI 802.11b/g cards" - depends on LIBERTAS && SPI && GENERIC_GPIO + depends on LIBERTAS && SPI ---help--- A driver for Marvell Libertas 8686 SPI devices.
drivers/net/wireless/libertas/if_spi.c +44 -48
212 lines not on this page · raw message
Signature · 1 line
1.6.0.6