]> git.baikalelectronics.ru Git - kernel.git/commit
spi: bcm2835: transform native-cs to gpio-cs on first spi_setup
authorMartin Sperl <kernel@martin.sperl.org>
Mon, 6 Apr 2015 17:16:31 +0000 (17:16 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 10 Apr 2015 18:50:52 +0000 (19:50 +0100)
commit73a0723de92179da2c59317cdc613947e589a3b8
tree119afa8a1ede43f405397e2227e5ce4c69686f1b
parent0a713292d0913e900de91d2eee5e0d507d9aa12c
spi: bcm2835: transform native-cs to gpio-cs on first spi_setup

Transforms the bcm-2835 native SPI-chip select to their gpio-cs equivalent.

This allows for some support of some optimizations that are not
possible due to HW-gliches on the CS line - especially filling
the FIFO before enabling SPI interrupts (by writing to CS register)
while the transfer is already in progress (See commit: 0a713292d091)

This patch also works arround some issues in bcm2835-pinctrl which does not
set the value when setting the GPIO as output - it just sets up output and
(typically) leaves the GPIO as low.  When a fix for this is merged then this
gpio_set_value can get removed from bcm2835_spi_setup.

Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bcm2835.c