From: Cyrille Pitchen <cyrille.pitchen@atmel.com>
To: "P L Sai Krishna" <lakshmi.sai.krishna.potthuri@xilinx.com>,
"Michal Simek" <michal.simek@xilinx.com>,
"Soren Brinkmann" <soren.brinkmann@xilinx.com>,
"David Woodhouse" <dwmw2@infradead.org>,
"Brian Norris" <computersforpeace@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Javier Martinez Canillas" <javier@osg.samsung.com>,
"Boris Brezillon" <boris.brezillon@free-electrons.com>,
"Stephen Warren" <swarren@nvidia.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Andrew F. Davis" <afd@ti.com>, "Marek Vasut" <marex@denx.de>,
"Jagan Teki" <jteki@openedev.com>,
"Rafał Miłecki" <zajec5@gmail.com>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
<linux-spi@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
"Harini Katakam" <harinik@xilinx.com>,
Punnaiah Choudary Kalluri <punnaia@xilinx.com>,
Anirudha Sarangi <anirudh@xilinx.com>,
P L Sai Krishna <lakshmis@xilinx.com>,
"R, Vignesh" <vigneshr@ti.com>
Subject: Re: [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the spi_transfer structure.
Date: Thu, 7 Apr 2016 17:02:44 +0200 [thread overview]
Message-ID: <57067694.8030806@atmel.com> (raw)
In-Reply-To: <1460039969-9835-1-git-send-email-lakshmis@xilinx.com>
Hi all,
Le 07/04/2016 16:39, P L Sai Krishna a écrit :
> 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.
Dummy cycles are only used with SPI NOR flashes, aren't they?
I guess so since there is also a patch dedicated to the m25p80 driver.
So why not using the spi_flash_read() API already introduced by Vignesh
in the SPI layer?
struct spi_flash_read_message already includes a 'dummy_bytes' member.
>
> 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;
> };
>
Best regards,
Cyrille
WARNING: multiple messages have this Message-ID (diff)
From: Cyrille Pitchen <cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: "P L Sai Krishna"
<lakshmi.sai.krishna.potthuri-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
"Michal Simek"
<michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
"Soren Brinkmann"
<soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
"David Woodhouse" <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
"Brian Norris"
<computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Mark Brown" <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Javier Martinez Canillas"
<javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
"Boris Brezillon"
<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
"Stephen Warren"
<swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
"Geert Uytterhoeven"
<geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>,
"Andrew F. Davis" <afd-l0cyMroinI0@public.gmane.org>,
"Marek Vasut" <marex-ynQEQJNshbs@public.gmane.org>,
"Jagan Teki" <jteki-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.org>,
"Rafał Miłecki" <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: <linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"Harini Katakam"
<harinik-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
Punnaiah Choudary Kalluri
<punnaia-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
Anirudha Sarangi
<anirudh-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
P L Sai Krishna
<lakshmis-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
"R, Vignesh" <vigneshr-l0cyMroinI0@public.gmane.org>
Subject: Re: [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the spi_transfer structure.
Date: Thu, 7 Apr 2016 17:02:44 +0200 [thread overview]
Message-ID: <57067694.8030806@atmel.com> (raw)
In-Reply-To: <1460039969-9835-1-git-send-email-lakshmis-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
Hi all,
Le 07/04/2016 16:39, P L Sai Krishna a écrit :
> 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.
Dummy cycles are only used with SPI NOR flashes, aren't they?
I guess so since there is also a patch dedicated to the m25p80 driver.
So why not using the spi_flash_read() API already introduced by Vignesh
in the SPI layer?
struct spi_flash_read_message already includes a 'dummy_bytes' member.
>
> Signed-off-by: P L Sai Krishna <lakshmis-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
> ---
> 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;
> };
>
Best regards,
Cyrille
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: cyrille.pitchen@atmel.com (Cyrille Pitchen)
To: linux-arm-kernel@lists.infradead.org
Subject: [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the spi_transfer structure.
Date: Thu, 7 Apr 2016 17:02:44 +0200 [thread overview]
Message-ID: <57067694.8030806@atmel.com> (raw)
In-Reply-To: <1460039969-9835-1-git-send-email-lakshmis@xilinx.com>
Hi all,
Le 07/04/2016 16:39, P L Sai Krishna a ?crit :
> 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.
Dummy cycles are only used with SPI NOR flashes, aren't they?
I guess so since there is also a patch dedicated to the m25p80 driver.
So why not using the spi_flash_read() API already introduced by Vignesh
in the SPI layer?
struct spi_flash_read_message already includes a 'dummy_bytes' member.
>
> 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;
> };
>
Best regards,
Cyrille
next prev parent reply other threads:[~2016-04-07 15:02 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` 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
2016-04-07 14:39 ` P L Sai Krishna
2016-04-07 14:59 ` kbuild test robot
2016-04-07 14:59 ` kbuild test robot
2016-04-07 14:59 ` kbuild test robot
2016-04-07 14:39 ` [LINUX PATCH v2 3/3] spi:zynqmp:gqspi: Added separate dummy entry P L Sai Krishna
2016-04-07 14:39 ` P L Sai Krishna
2016-04-07 14:39 ` P L Sai Krishna
2016-04-07 15:02 ` Cyrille Pitchen [this message]
2016-04-07 15:02 ` [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the spi_transfer structure Cyrille Pitchen
2016-04-07 15:02 ` Cyrille Pitchen
2016-04-13 5:21 ` Lakshmi Sai Krishna Potthuri
2016-04-13 5:21 ` Lakshmi Sai Krishna Potthuri
2016-04-13 5:21 ` Lakshmi Sai Krishna Potthuri
2016-04-14 8:06 ` Cyrille Pitchen
2016-04-14 8:06 ` Cyrille Pitchen
2016-04-14 8:06 ` Cyrille Pitchen
2016-04-14 8:57 ` Mark Brown
2016-04-14 8:57 ` Mark Brown
2016-04-14 8:57 ` Mark Brown
2016-04-14 15:23 ` Cyrille Pitchen
2016-04-14 15:23 ` Cyrille Pitchen
2016-04-14 15:23 ` Cyrille Pitchen
2016-04-12 6:10 ` Mark Brown
2016-04-12 6:10 ` Mark Brown
2016-04-12 6:10 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57067694.8030806@atmel.com \
--to=cyrille.pitchen@atmel.com \
--cc=afd@ti.com \
--cc=anirudh@xilinx.com \
--cc=boris.brezillon@free-electrons.com \
--cc=broonie@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=geert+renesas@glider.be \
--cc=harinik@xilinx.com \
--cc=javier@osg.samsung.com \
--cc=jteki@openedev.com \
--cc=lakshmi.sai.krishna.potthuri@xilinx.com \
--cc=lakshmis@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=marex@denx.de \
--cc=michal.simek@xilinx.com \
--cc=punnaia@xilinx.com \
--cc=soren.brinkmann@xilinx.com \
--cc=swarren@nvidia.com \
--cc=vigneshr@ti.com \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.