]> git.baikalelectronics.ru Git - kernel.git/commit
spi: fsl: Convert to use CS GPIO descriptors
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 4 Aug 2019 00:35:39 +0000 (02:35 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 28 Aug 2019 13:10:41 +0000 (14:10 +0100)
commita673e05903a237f941fd35d1af09f2fc4106d61d
tree7abd13ed97cf2f542bff6faffd2bda45a0f4ae33
parenta0627c0e8ede1b8959e0afad3671c46275153037
spi: fsl: Convert to use CS GPIO descriptors

This converts the Freescale SPI master driver to use GPIO
descriptors for chip select handling.

The Freescale (fsl) driver has a lot of quirks to look up
"gpios" rather than "cs-gpios" from the device tree.
After the prior patch that will make gpiolib return the
GPIO descriptor for "gpios" in response to a request for
"cs-gpios", this code can be cut down quite a bit.

The driver has custom handling of chip select rather
than using the core (which may be possible but not
done in this patch) so it still needs to refer directly
to spi->cs_gpiod to set the chip select.

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20190804003539.985-1-linus.walleij@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-lib.h
drivers/spi/spi-fsl-spi.c