linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] spi: clarify what driver can do with message->status
@ 2015-02-24 10:04 Andy Shevchenko
       [not found] ` <1424772249-9676-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2015-02-24 10:04 UTC (permalink / raw)
  To: Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA; +Cc: Andy Shevchenko

Currently it's unclear from the documentation if an actual driver may or may
not override the message->status field. It seems there is no other way to
indicate an error when transfer is failed, e.g. when gets overrun or underrun
interrupt. The patch states this clearly in the comments near to field
definition.

Signed-off-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
 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 ed9489d..92cff9a 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -680,6 +680,9 @@ struct spi_message {
 	void			*context;
 	unsigned		frame_length;
 	unsigned		actual_length;
+
+	/* The actual driver may set this field to indicate an error, e.g. -EIO
+	 * for failed transfer. */
 	int			status;
 
 	/* for optional use by whatever driver currently owns the
-- 
2.1.4

--
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] 7+ messages in thread

end of thread, other threads:[~2015-02-26 13:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-24 10:04 [PATCH v1 1/1] spi: clarify what driver can do with message->status Andy Shevchenko
     [not found] ` <1424772249-9676-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-02-24 13:24   ` Mark Brown
     [not found]     ` <20150224132411.GF6236-bheZrs9scGb3/WHNxyQH9YN0K6Il/+VY@public.gmane.org>
2015-02-24 13:33       ` Andy Shevchenko
     [not found]         ` <1424784807.14897.24.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-02-24 14:17           ` Mark Brown
     [not found]             ` <20150224141706.GK6236-bheZrs9scGb3/WHNxyQH9YN0K6Il/+VY@public.gmane.org>
2015-02-24 14:35               ` Andy Shevchenko
     [not found]                 ` <1424788527.14897.27.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-02-26  2:48                   ` Mark Brown
     [not found]                     ` <20150226024812.GK6236-bheZrs9scGb3/WHNxyQH9YN0K6Il/+VY@public.gmane.org>
2015-02-26 13:15                       ` 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).