All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] spi: Introduce one new field to set word delay
@ 2018-08-16 12:54 Baolin Wang
  2018-08-16 12:54 ` [PATCH v2 2/3] dt-bindings: spi: Add Spreadtrum SPI controller documentation Baolin Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Baolin Wang @ 2018-08-16 12:54 UTC (permalink / raw)
  To: broonie, robh+dt, mark.rutland
  Cc: orsonzhai, zhang.lyra, lanqing.liu, baolin.wang, linux-spi,
	devicetree, linux-kernel

For some SPI controllers, after each word size (specified by bits_per_word)
transimission, the hardware need some delay to make sure the slave has enough
time to receive the whole data.

So introducing one new 'word_delay' field of struct spi_tansfer for slave
devices to set this inter word delay time.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
Changes from v1:
 - New patch in v2.
---
 include/linux/spi/spi.h |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index a64235e..d698f9d 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -711,6 +711,8 @@ extern void spi_res_release(struct spi_controller *ctlr,
  * @delay_usecs: microseconds to delay after this transfer before
  *	(optionally) changing the chipselect status, then starting
  *	the next transfer or completing this @spi_message.
+ * @word_delay: clock cycles to inter word delay after each word size
+ *	(set by bits_per_word) transmission.
  * @transfer_list: transfers are sequenced through @spi_message.transfers
  * @tx_sg: Scatterlist for transmit, currently not for client use
  * @rx_sg: Scatterlist for receive, currently not for client use
@@ -793,6 +795,7 @@ struct spi_transfer {
 	u8		bits_per_word;
 	u16		delay_usecs;
 	u32		speed_hz;
+	u16		word_delay;
 
 	struct list_head transfer_list;
 };
-- 
1.7.9.5


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

end of thread, other threads:[~2018-08-31  8:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-16 12:54 [PATCH v2 1/3] spi: Introduce one new field to set word delay Baolin Wang
2018-08-16 12:54 ` [PATCH v2 2/3] dt-bindings: spi: Add Spreadtrum SPI controller documentation Baolin Wang
2018-08-20 19:38   ` Rob Herring
2018-08-20 19:38     ` Rob Herring
2018-08-16 12:54 ` [PATCH v2 3/3] spi: sprd: Add SPI driver for Spreadtrum SC9860 Baolin Wang
2018-08-28 20:57   ` Applied "spi: sprd: Add SPI driver for Spreadtrum SC9860" to the spi tree Mark Brown
2018-08-28 20:57     ` Mark Brown
2018-08-28 20:57     ` Mark Brown
2018-08-29 11:02 ` Applied "spi: Introduce one new field to set word delay" " Mark Brown
2018-08-29 11:02   ` Mark Brown
2018-08-29 11:02   ` Mark Brown
2018-08-29 11:33 ` [PATCH v2 1/3] spi: Introduce one new field to set word delay Jan Kundrát
2018-08-29 11:33   ` Jan Kundrát
2018-08-29 11:47   ` Mark Brown
2018-08-31  8:38   ` Baolin Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.