@@ -265,7 +265,12 @@ static int spidev_message(struct spidev_data *spidev,
buf += k_tmp->len;
k_tmp->cs_change = !!u_tmp->cs_change;
- k_tmp->bits_per_word = u_tmp->bits_per_word;
+
+ if (!u_tmp->bits_per_word && u_tmp->bits_per_burst)
+ k_tmp->bits_per_word = u_tmp->bits_per_burst;
+ else
+ k_tmp->bits_per_word = u_tmp->bits_per_word;
+
k_tmp->delay_usecs = u_tmp->delay_usecs;
k_tmp->speed_hz = u_tmp->speed_hz;
#ifdef VERBOSE
@@ -75,7 +75,7 @@ struct spi_device {
struct spi_master *master;
u32 max_speed_hz;
u8 chip_select;
- u8 bits_per_word;
+ u32 bits_per_word;
u16 mode;
#define SPI_CPHA 0x01 /* clock phase */
#define SPI_CPOL 0x02 /* clock polarity */
@@ -586,7 +586,7 @@ struct spi_transfer {
#define SPI_NBITS_SINGLE 0x01 /* 1bit transfer */
#define SPI_NBITS_DUAL 0x02 /* 2bits transfer */
#define SPI_NBITS_QUAD 0x04 /* 4bits transfer */
- u8 bits_per_word;
+ u32 bits_per_word;
u16 delay_usecs;
u32 speed_hz;
@@ -92,7 +92,7 @@ struct spi_ioc_transfer {
__u16 delay_usecs;
__u8 bits_per_word;
__u8 cs_change;
- __u32 pad;
+ __u32 bits_per_burst;
/* If the contents of 'struct spi_ioc_transfer' ever change
* incompatibly, then the ioctl number (currently 0) must change;
SPI controllers found on modern SoCs have rather large SPI FIFOs and allow for uninterrupted SPI transaction that are more then 256 bytes long. This commit adds necessary plumbing for such SPI transfers. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> --- drivers/spi/spidev.c | 7 ++++++- include/linux/spi/spi.h | 4 ++-- include/uapi/linux/spi/spidev.h | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-)