]> git.baikalelectronics.ru Git - uboot.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)
commit273f0c91bd920e504468167617c67e5b2ebcbdac
tree297615bf836bef7798649ec1932b225d01eed60b
parent4f2d13a64c2d4d38006ce050e68a1b66b25acf26
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