* [PATCH v2 0/3] spi: documentation improvements
@ 2014-01-24 8:36 Baruch Siach
[not found] ` <cover.1390552232.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Baruch Siach @ 2014-01-24 8:36 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, Baruch Siach
This series improves spi documentation as follows:
* Add explicit note that transfer_one and transfer_one_message are mtually
exclusive
* Add transfer_one documentation to spi-summary
* s/transfer/message/ in the transfer_one_message description
v2:
* Rebase over Mark's fix/core branch (Geert Uytterhoe)
* Correct the description of code behaviour when transfer_one and
transfer_one_message are both implemented (Geert Uytterhoe)
Baruch Siach (3):
spi: spi.h: clarify the documentation of transfer_one
Doc: spi: document the transfer_one spi_master callback
spi: correct the transfer_one_message documentation wording
Documentation/spi/spi-summary | 12 +++++++++++-
include/linux/spi/spi.h | 7 +++++--
2 files changed, 16 insertions(+), 3 deletions(-)
--
1.8.5.2
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/3] spi: spi.h: clarify the documentation of transfer_one
[not found] ` <cover.1390552232.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
@ 2014-01-24 8:36 ` Baruch Siach
2014-01-24 8:36 ` [PATCH v2 2/3] Doc: spi: document the transfer_one spi_master callback Baruch Siach
2014-01-24 8:36 ` [PATCH v2 3/3] spi: correct the transfer_one_message documentation wording Baruch Siach
2 siblings, 0 replies; 8+ messages in thread
From: Baruch Siach @ 2014-01-24 8:36 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, Baruch Siach
Explicitly note the transfer_one and transfer_one_message are mutually
exclusive, to make the text a little more newcomers friendly.
Signed-off-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
---
include/linux/spi/spi.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 9f5242df9311..f5a08c3f3e60 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -287,7 +287,10 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
* - return 1 if the transfer is still in progress. When
* the driver is finished with this transfer it must
* call spi_finalize_current_transfer() so the subsystem
- * can issue the next transfer
+ * can issue the next transfer. Note: transfer_one and
+ * transfer_one_message are mutually exclusive; when both
+ * are set, the generic subsystem does not call your
+ * transfer_one callback.
* @unprepare_message: undo any work done by prepare_message().
* @cs_gpios: Array of GPIOs to use as chip select lines; one per CS
* number. Any individual value may be -ENOENT for CS lines that
--
1.8.5.2
--
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] Doc: spi: document the transfer_one spi_master callback
[not found] ` <cover.1390552232.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2014-01-24 8:36 ` [PATCH v2 1/3] spi: spi.h: clarify the documentation of transfer_one Baruch Siach
@ 2014-01-24 8:36 ` Baruch Siach
[not found] ` <1abe062855111800754477d1340635b5a69d5635.1390552232.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2014-01-24 8:36 ` [PATCH v2 3/3] spi: correct the transfer_one_message documentation wording Baruch Siach
2 siblings, 1 reply; 8+ messages in thread
From: Baruch Siach @ 2014-01-24 8:36 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, Baruch Siach
Signed-off-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
---
Documentation/spi/spi-summary | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
index f21edb983413..735acbf1ce0c 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -545,6 +545,16 @@ SPI MASTER METHODS
spi_finalize_current_message() so the subsystem can issue the next
transfer. This may sleep.
+ master->transfer_one(struct spi_master *master, struct spi_device *spi,
+ struct spi_transfer *transfer)
+ The subsystem calls the driver to transfer a single transfer while
+ queuing transfers that arrive in the meantime. When the driver is
+ finished with this message, it must call
+ spi_finalize_current_transfer() so the subsystem can issue the next
+ transfer. This may sleep. Note: transfer_one and transfer_one_message
+ are mutually exclusive; when both are set, the generic subsystem does
+ not call your transfer_one callback.
+
DEPRECATED METHODS
master->transfer(struct spi_device *spi, struct spi_message *message)
--
1.8.5.2
--
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] spi: correct the transfer_one_message documentation wording
[not found] ` <cover.1390552232.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2014-01-24 8:36 ` [PATCH v2 1/3] spi: spi.h: clarify the documentation of transfer_one Baruch Siach
2014-01-24 8:36 ` [PATCH v2 2/3] Doc: spi: document the transfer_one spi_master callback Baruch Siach
@ 2014-01-24 8:36 ` Baruch Siach
2 siblings, 0 replies; 8+ messages in thread
From: Baruch Siach @ 2014-01-24 8:36 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, Baruch Siach
The transfer_one_message callback handles messages, not transfers.
Signed-off-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
---
Documentation/spi/spi-summary | 2 +-
include/linux/spi/spi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
index 735acbf1ce0c..ea2f2da611a6 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -543,7 +543,7 @@ SPI MASTER METHODS
queuing transfers that arrive in the meantime. When the driver is
finished with this message, it must call
spi_finalize_current_message() so the subsystem can issue the next
- transfer. This may sleep.
+ message. This may sleep.
master->transfer_one(struct spi_master *master, struct spi_device *spi,
struct spi_transfer *transfer)
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index f5a08c3f3e60..60b787ad4ed1 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -273,7 +273,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
* message while queuing transfers that arrive in the meantime. When the
* driver is finished with this message, it must call
* spi_finalize_current_message() so the subsystem can issue the next
- * transfer
+ * message
* @unprepare_transfer_hardware: there are currently no more messages on the
* queue so the subsystem notifies the driver that it may relax the
* hardware by issuing this call
--
1.8.5.2
--
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/3] Doc: spi: document the transfer_one spi_master callback
[not found] ` <1abe062855111800754477d1340635b5a69d5635.1390552232.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
@ 2014-01-24 8:47 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVrNcs0uWfVNdXGw+HTuGHy2nGXR=tMqdzz236LGFHVoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2014-01-24 8:47 UTC (permalink / raw)
To: Baruch Siach; +Cc: Mark Brown, linux-spi
On Fri, Jan 24, 2014 at 9:36 AM, Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org> wrote:
> +++ b/Documentation/spi/spi-summary
> @@ -545,6 +545,16 @@ SPI MASTER METHODS
> spi_finalize_current_message() so the subsystem can issue the next
> transfer. This may sleep.
>
> + master->transfer_one(struct spi_master *master, struct spi_device *spi,
> + struct spi_transfer *transfer)
> + The subsystem calls the driver to transfer a single transfer while
> + queuing transfers that arrive in the meantime. When the driver is
> + finished with this message, it must call
> + spi_finalize_current_transfer() so the subsystem can issue the next
> + transfer. This may sleep. Note: transfer_one and transfer_one_message
> + are mutually exclusive; when both are set, the generic subsystem does
> + not call your transfer_one callback.
You still forgot the updates I made in
http://lkml.indiana.edu/hypermail/linux/kernel/1401.2/02465.html
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/3] Doc: spi: document the transfer_one spi_master callback
[not found] ` <CAMuHMdVrNcs0uWfVNdXGw+HTuGHy2nGXR=tMqdzz236LGFHVoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-01-24 8:49 ` Baruch Siach
2014-01-24 8:57 ` Geert Uytterhoeven
0 siblings, 1 reply; 8+ messages in thread
From: Baruch Siach @ 2014-01-24 8:49 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Mark Brown, linux-spi
Hi Geert,
On Fri, Jan 24, 2014 at 09:47:10AM +0100, Geert Uytterhoeven wrote:
> On Fri, Jan 24, 2014 at 9:36 AM, Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org> wrote:
> > +++ b/Documentation/spi/spi-summary
> > @@ -545,6 +545,16 @@ SPI MASTER METHODS
> > spi_finalize_current_message() so the subsystem can issue the next
> > transfer. This may sleep.
> >
> > + master->transfer_one(struct spi_master *master, struct spi_device *spi,
> > + struct spi_transfer *transfer)
> > + The subsystem calls the driver to transfer a single transfer while
> > + queuing transfers that arrive in the meantime. When the driver is
> > + finished with this message, it must call
> > + spi_finalize_current_transfer() so the subsystem can issue the next
> > + transfer. This may sleep. Note: transfer_one and transfer_one_message
> > + are mutually exclusive; when both are set, the generic subsystem does
> > + not call your transfer_one callback.
>
> You still forgot the updates I made in
> http://lkml.indiana.edu/hypermail/linux/kernel/1401.2/02465.html
AFAICS, your patch touches spi.h, not spi-summary. Am I missing something
here?
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org - tel: +972.2.679.5364, http://www.tkos.co.il -
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/3] Doc: spi: document the transfer_one spi_master callback
2014-01-24 8:49 ` Baruch Siach
@ 2014-01-24 8:57 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVH9XDcVGXt2CcqkABGbz4Kz9bA5M1NPSAyOnwm6u4j2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2014-01-24 8:57 UTC (permalink / raw)
To: Baruch Siach; +Cc: Mark Brown, linux-spi
On Fri, Jan 24, 2014 at 9:49 AM, Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org> wrote:
>> > + master->transfer_one(struct spi_master *master, struct spi_device *spi,
>> > + struct spi_transfer *transfer)
>> > + The subsystem calls the driver to transfer a single transfer while
>> > + queuing transfers that arrive in the meantime. When the driver is
>> > + finished with this message, it must call
>> > + spi_finalize_current_transfer() so the subsystem can issue the next
>> > + transfer. This may sleep. Note: transfer_one and transfer_one_message
>> > + are mutually exclusive; when both are set, the generic subsystem does
>> > + not call your transfer_one callback.
>>
>> You still forgot the updates I made in
>> http://lkml.indiana.edu/hypermail/linux/kernel/1401.2/02465.html
>
> AFAICS, your patch touches spi.h, not spi-summary. Am I missing something
> here?
I think the description in spi-summary should be updated to match the
changes to spi.h.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/3] Doc: spi: document the transfer_one spi_master callback
[not found] ` <CAMuHMdVH9XDcVGXt2CcqkABGbz4Kz9bA5M1NPSAyOnwm6u4j2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-01-24 9:08 ` Baruch Siach
0 siblings, 0 replies; 8+ messages in thread
From: Baruch Siach @ 2014-01-24 9:08 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Mark Brown, linux-spi
Hi Geert,
On Fri, Jan 24, 2014 at 09:57:38AM +0100, Geert Uytterhoeven wrote:
> On Fri, Jan 24, 2014 at 9:49 AM, Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org> wrote:
> >> > + master->transfer_one(struct spi_master *master, struct spi_device *spi,
> >> > + struct spi_transfer *transfer)
> >> > + The subsystem calls the driver to transfer a single transfer while
> >> > + queuing transfers that arrive in the meantime. When the driver is
> >> > + finished with this message, it must call
> >> > + spi_finalize_current_transfer() so the subsystem can issue the next
> >> > + transfer. This may sleep. Note: transfer_one and transfer_one_message
> >> > + are mutually exclusive; when both are set, the generic subsystem does
> >> > + not call your transfer_one callback.
> >>
> >> You still forgot the updates I made in
> >> http://lkml.indiana.edu/hypermail/linux/kernel/1401.2/02465.html
> >
> > AFAICS, your patch touches spi.h, not spi-summary. Am I missing something
> > here?
>
> I think the description in spi-summary should be updated to match the
> changes to spi.h.
OK. Will do.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org - tel: +972.2.679.5364, http://www.tkos.co.il -
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-01-24 9:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24 8:36 [PATCH v2 0/3] spi: documentation improvements Baruch Siach
[not found] ` <cover.1390552232.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2014-01-24 8:36 ` [PATCH v2 1/3] spi: spi.h: clarify the documentation of transfer_one Baruch Siach
2014-01-24 8:36 ` [PATCH v2 2/3] Doc: spi: document the transfer_one spi_master callback Baruch Siach
[not found] ` <1abe062855111800754477d1340635b5a69d5635.1390552232.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2014-01-24 8:47 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVrNcs0uWfVNdXGw+HTuGHy2nGXR=tMqdzz236LGFHVoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-24 8:49 ` Baruch Siach
2014-01-24 8:57 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVH9XDcVGXt2CcqkABGbz4Kz9bA5M1NPSAyOnwm6u4j2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-24 9:08 ` Baruch Siach
2014-01-24 8:36 ` [PATCH v2 3/3] spi: correct the transfer_one_message documentation wording Baruch Siach
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).