mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 09:13:55 +08:00
omap_uwire: SPI_CPHA mode bugfix
The omap_uwire controller driver handles SPI_CPHA incorrectly; It should mean: CPHA=0 ... sample at leading edge of clock CPHA=1 ... sample at trailing edge of clock This bug has been masked by inverse bugs in layered drivers; and was uncovered by running some of them on non-OMAP hardware. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
81fc632355
commit
e5f1b194a9
@ -358,11 +358,11 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
|
||||
switch (spi->mode & (SPI_CPOL | SPI_CPHA)) {
|
||||
case SPI_MODE_0:
|
||||
case SPI_MODE_3:
|
||||
flags |= UWIRE_WRITE_RISING_EDGE | UWIRE_READ_FALLING_EDGE;
|
||||
flags |= UWIRE_WRITE_FALLING_EDGE | UWIRE_READ_RISING_EDGE;
|
||||
break;
|
||||
case SPI_MODE_1:
|
||||
case SPI_MODE_2:
|
||||
flags |= UWIRE_WRITE_FALLING_EDGE | UWIRE_READ_RISING_EDGE;
|
||||
flags |= UWIRE_WRITE_RISING_EDGE | UWIRE_READ_FALLING_EDGE;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user