linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] spi: Group cs_change and cs_off flags together in struct spi_transfer
@ 2022-09-08 12:54 Andy Shevchenko
  2022-09-08 13:02 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2022-09-08 12:54 UTC (permalink / raw)
  To: Mark Brown, linux-spi, linux-kernel; +Cc: 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.

Group cs_change and cs_off flags together.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/spi/spi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index e111cf5e77de..bffcad4e7d6e 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -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 */
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] spi: Group cs_change and cs_off flags together in struct spi_transfer
  2022-09-08 12:54 [PATCH v1 1/1] spi: Group cs_change and cs_off flags together in struct spi_transfer Andy Shevchenko
@ 2022-09-08 13:02 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2022-09-08 13:02 UTC (permalink / raw)
  To: Mark Brown, linux-spi, linux-kernel

On Thu, Sep 08, 2022 at 03:54:44PM +0300, Andy Shevchenko wrote:
> 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.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-08 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-08 12:54 [PATCH v1 1/1] spi: Group cs_change and cs_off flags together in struct spi_transfer Andy Shevchenko
2022-09-08 13:02 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).