linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the spi_transfer structure.
@ 2016-04-07 14:39 P L Sai Krishna
  2016-04-07 14:39 ` [LINUX PATCH v2 2/3] mtd:m25p80: Assigned number of dummy cycles to dummy_cycles P L Sai Krishna
       [not found] ` <1460039969-9835-1-git-send-email-lakshmis-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
  0 siblings, 2 replies; 10+ messages in thread
From: P L Sai Krishna @ 2016-04-07 14:39 UTC (permalink / raw)
  To: Michal Simek, Soren Brinkmann, David Woodhouse, Brian Norris,
	Mark Brown, Javier Martinez Canillas, Boris Brezillon,
	Stephen Warren, Geert Uytterhoeven, Andrew F. Davis, Marek Vasut,
	Jagan Teki, Rafał Miłecki
  Cc: linux-mtd, linux-kernel, linux-spi, linux-arm-kernel,
	Harini Katakam, Punnaiah Choudary Kalluri, Anirudha Sarangi,
	P L Sai Krishna

This patch adds dummy_cycles entry in the spi_transfer structure.
len field in the transfer structure contains dummy bytes along with
actual data bytes, controllers which requires dummy bytes use len
field and simply Ignore the dummy_cycles field. Controllers which
expects dummy cycles won't work directly by using len field because
host driver doesn't know that len field of a particular transfer
includes dummy bytes or not (and also number of dummy bytes included
in len field). In such cases host driver use this dummy_cycles field
to identify the number of dummy cycles and based on that it will send
the required number of dummy cycles.

Signed-off-by: P L Sai Krishna <lakshmis@xilinx.com>
---
v2: 
 - Changed the structure member name from dummy to dummy_cycles.
 - Updated the documentation of dummy_cycles.
 - m25p80 changes split into another patch.

 include/linux/spi/spi.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 857a9a1..63135b3 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -664,6 +664,9 @@ extern void spi_res_release(struct spi_master *master,
  * @len: size of rx and tx buffers (in bytes)
  * @speed_hz: Select a speed other than the device default for this
  *      transfer. If 0 the default (from @spi_device) is used.
+ * @dummy_cycles: number of dummy cycles. If host controller requires
+ * 	dummy cycles rather than dummy bytes which send along with Cmd
+ *	and address then this dummy_cycles is used.
  * @bits_per_word: select a bits_per_word other than the device default
  *      for this transfer. If 0 the default (from @spi_device) is used.
  * @cs_change: affects chipselect after this transfer completes
@@ -752,6 +755,7 @@ struct spi_transfer {
 	u8		bits_per_word;
 	u16		delay_usecs;
 	u32		speed_hz;
+	u32		dummy_cycles;
 
 	struct list_head transfer_list;
 };
-- 
2.1.2

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

end of thread, other threads:[~2016-04-14 15:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-07 14:39 [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the spi_transfer structure P L Sai Krishna
2016-04-07 14:39 ` [LINUX PATCH v2 2/3] mtd:m25p80: Assigned number of dummy cycles to dummy_cycles P L Sai Krishna
     [not found]   ` <1460039969-9835-2-git-send-email-lakshmis-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2016-04-07 14:59     ` kbuild test robot
     [not found] ` <1460039969-9835-1-git-send-email-lakshmis-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2016-04-07 14:39   ` [LINUX PATCH v2 3/3] spi:zynqmp:gqspi: Added separate dummy entry P L Sai Krishna
2016-04-07 15:02   ` [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the spi_transfer structure Cyrille Pitchen
     [not found]     ` <57067694.8030806-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-04-13  5:21       ` Lakshmi Sai Krishna Potthuri
     [not found]         ` <4FF8F58FAA9D5D4193D4E554E4352C5902C720DE-4lKfpRxZ5ekkx2a1wsGfbYg+Gb3gawCHQz34XiSyOiE@public.gmane.org>
2016-04-14  8:06           ` Cyrille Pitchen
     [not found]             ` <570F4F9F.3090605-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-04-14  8:57               ` Mark Brown
     [not found]                 ` <20160414085707.GE18024-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-04-14 15:23                   ` Cyrille Pitchen
2016-04-12  6:10   ` Mark Brown

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).