]> git.dujemihanovic.xyz Git - u-boot.git/commit
spi: add support for all spi modes with soft spi
authorJohannes Holland <johannes.holland@infineon.com>
Mon, 11 May 2020 13:22:26 +0000 (15:22 +0200)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 9 Jul 2020 15:28:06 +0000 (20:58 +0530)
commit0e146993bb3da59d2c52515048405444f35f00ec
tree297615bf836bef7798649ec1932b225d01eed60b
parentf247354708ec93e995cf61901adc6d728762b196
spi: add support for all spi modes with soft spi

The spi bitbanging driver did not implement all spi modes properly. Add
code to support all spi modes, honoring soft_spi_set_mode() and
defaulting to spi mode 0. Previously, CPHA was implemented inversely
(defaulting to CPHA=1) and CPOL=1 was hardcoded.

Signed-off-by: Johannes Holland <johannes.holland@infineon.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/spi/soft_spi.c