Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: expand mode support

This patch changes mode and mode_bits from u16 to u32 to allow more
mode configurations.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Sowjanya Komatineni and committed by
Mark Brown
937e6d75 bf6e8396

+3 -3
+3 -3
include/linux/spi/spi.h
··· 143 143 u32 max_speed_hz; 144 144 u8 chip_select; 145 145 u8 bits_per_word; 146 - u16 mode; 146 + u32 mode; 147 147 #define SPI_CPHA 0x01 /* clock phase */ 148 148 #define SPI_CPOL 0x02 /* clock polarity */ 149 149 #define SPI_MODE_0 (0|0) /* (original MicroWire) */ ··· 443 443 u16 dma_alignment; 444 444 445 445 /* spi_device.mode flags understood by this controller driver */ 446 - u16 mode_bits; 446 + u32 mode_bits; 447 447 448 448 /* bitmask of supported bits_per_word for transfers */ 449 449 u32 bits_per_word_mask; ··· 1291 1291 /* mode becomes spi_device.mode, and is essential for chips 1292 1292 * where the default of SPI_CS_HIGH = 0 is wrong. 1293 1293 */ 1294 - u16 mode; 1294 + u32 mode; 1295 1295 1296 1296 /* ... may need additional spi_device chip config data here. 1297 1297 * avoid stuff protocol drivers can set; but include stuff