]> git.baikalelectronics.ru Git - kernel.git/commit
spi: davinci: Convert to use CS GPIO descriptors
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 7 Jan 2019 15:51:55 +0000 (16:51 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 9 Jan 2019 12:42:11 +0000 (12:42 +0000)
commite287de87e055265caed6b3ca78826eeda50e4e7b
tree59461549e2bab8f9aaa7c0a968fd69c1d34e036f
parent9d79680692237dd3d5f12927495ab5101d203896
spi: davinci: Convert to use CS GPIO descriptors

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

DaVinci parses the device tree a second time for the chip
select GPIOs (no relying on the parsing already happening
in the SPI core) and handles inversion semantics locally.

We simply drop the extra parsing and set up and move the
CS handling to the core and gpiolib. The fact that the
driver is actively driving the GPIO in the
davinci_spi_chipselect() callback is confusing since the
host does not set SPI_MASTER_GPIO_SS so this should not
ever get called when using GPIO CS. I put in a comment
about this.

This driver also supports instantiation from board files,
but these are all using native chip selects so no problem
with GPIO lines here.

Cc: David Lechner <david@lechnology.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Linuxarm <linuxarm@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-davinci.c