]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: microchip: Initial SPI regmap support
authorMarek Vasut <marex@denx.de>
Tue, 25 Jun 2019 23:43:45 +0000 (01:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Jun 2019 18:00:31 +0000 (11:00 -0700)
commit3007c9c4d7557a70ed497f91481df1c3ab06bb0b
tree7278a1c421c3d5a832acb61e86119e5e70307764
parent14a3c10dc4bc79a815a39618a6a57a2307e78ef3
net: dsa: microchip: Initial SPI regmap support

Add basic SPI regmap support into the driver.

Previous patches unconver that ksz_spi_write() is always ever called
with len = 1, 2 or 4. We can thus drop the if (len > SPI_TX_BUF_LEN)
check and we can also drop the allocation of the txbuf which is part
of the driver data and wastes 256 bytes for no reason. Regmap covers
the whole thing now.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/Kconfig
drivers/net/dsa/microchip/ksz9477_spi.c
drivers/net/dsa/microchip/ksz_priv.h