Skip to contentSkip to conversation

spi: Group cs_change and cs_off flags together in struct spi_transfer

PATCH Superseded Andy Shevchenko 1 participant 2 messages Sep 8, 2022 SPI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: Group cs_change and cs_off flags together in struct spi_transfer

The commit 5e0531f6b90a ("spi: Add capability to perform some transfer with chipselect off") added a new flag but squezed it into a wrong group of struct spi_transfer members (note that SPI_NBITS_* are macros for easier interpretation of the tx_nbits and rx_nbits bitfields.

Group cs_change and cs_off flags together.

---
 include/linux/spi/spi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/spi/spi.h +1 -1
index e111cf5e77de..bffcad4e7d6e 100644
@@ -959,10 +959,10 @@ struct spi_transfer {
 	struct sg_table rx_sg;
 
 	unsigned	dummy_data:1;
+	unsigned	cs_off:1;
 	unsigned	cs_change:1;
 	unsigned	tx_nbits:3;
 	unsigned	rx_nbits:3;
-	unsigned	cs_off:1;
 #define	SPI_NBITS_SINGLE	0x01 /* 1bit transfer */
 #define	SPI_NBITS_DUAL		0x02 /* 2bits transfer */
 #define	SPI_NBITS_QUAD		0x04 /* 4bits transfer */
Signature · 1 line
2.35.1
#1 lore raw
Quoted 4 lines · Andy Shevchenko

The commit 5e0531f6b90a ("spi: Add capability to perform some transfer with chipselect off") added a new flag but squezed it into a wrong group of struct spi_transfer members (note that SPI_NBITS_* are macros for easier interpretation of the tx_nbits and rx_nbits bitfields.

Besides some small issues with the grammar above, I would like also to reshuffle the documentation part. Hence, please wait for v2 of this.

Signature · 2 lines
With Best Regards,
Andy Shevchenko