public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/3] spi: introduce max message size flag in spi_master
@ 2016-08-07 19:47 Heiner Kallweit
  2016-08-16 16:42 ` Mark Brown
  0 siblings, 1 reply; 23+ messages in thread
From: Heiner Kallweit @ 2016-08-07 19:47 UTC (permalink / raw)
  To: Mark Brown, Brian Norris; +Cc: linux-spi@vger.kernel.org, MTD Maling List

Recently a maximum transfer size was was introduced in struct spi_master.
However there are also spi controllers with a maximum message size, e.g.
fsl-espi has a max message size of 64KB.
As there are no (known) spi controller with differing size limits for
transfer and message, introduce a flag in spi_master to indicate that
the max transfer size is also the maximum message size.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 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 072cb2a..cadb1de 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -312,6 +312,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
  * @flags: other constraints relevant to this driver
  * @max_transfer_size: function that returns the max transfer size for
  *	a &spi_device; may be %NULL, so the default %SIZE_MAX will be used.
+ * @max_message_size_flag: indicates that max transfer size is also
+ *	max message size
  * @io_mutex: mutex for physical bus access
  * @bus_lock_spinlock: spinlock for SPI bus locking
  * @bus_lock_mutex: mutex for exclusion of multiple callers
@@ -446,6 +448,8 @@ struct spi_master {
 	 * the limit may depend on device transfer settings
 	 */
 	size_t (*max_transfer_size)(struct spi_device *spi);
+	/* flag indicating that max transfer size is also max message size */
+	bool			max_message_size_flag;
 
 	/* I/O mutex */
 	struct mutex		io_mutex;
-- 
2.9.2

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

end of thread, other threads:[~2016-12-24 23:47 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-07 19:47 [PATCH 1/3] spi: introduce max message size flag in spi_master Heiner Kallweit
2016-08-16 16:42 ` Mark Brown
2016-08-17 18:51   ` Heiner Kallweit
2016-08-17 19:08   ` [PATCH v2 1/3] spi: introduce max_message_size hook " Heiner Kallweit
2016-08-18 10:17     ` Mark Brown
2016-08-18 10:17     ` Applied "spi: introduce max_message_size hook in spi_master" to the spi tree Mark Brown
2016-08-17 19:09   ` [PATCH v2 2/3] mtd: m25p80: consider max message size in m25p80_read Heiner Kallweit
2016-09-16 19:13     ` Heiner Kallweit
2016-10-27 21:23       ` [PATCH RESEND] " Heiner Kallweit
2016-10-28  5:48         ` Heiner Kallweit
2016-10-28  5:58         ` [PATCH v2] " Heiner Kallweit
2016-10-29 17:59           ` Marek Vasut
2016-10-29 18:09             ` Mark Brown
2016-11-29  6:29           ` Heiner Kallweit
2016-12-23 15:15     ` [PATCH v2 2/3] " Cyrille Pitchen
2016-12-23 15:33     ` Cyrille Pitchen
2016-12-23 18:53       ` Marek Vasut
2016-12-23 21:04         ` Michal Suchanek
2016-12-24 10:20           ` Marek Vasut
2016-12-24 23:47             ` Heiner Kallweit
2016-08-17 19:11   ` [PATCH v2 3/3] spi: fsl-espi: eliminate spi nor flash read loop Heiner Kallweit
2016-08-18 10:17     ` Applied "spi: fsl-espi: eliminate spi nor flash read loop" to the spi tree Mark Brown
2016-10-13 18:50   ` [PATCH v2 RESEND 2/3] mtd: m25p80: consider max message size in m25p80_read Heiner Kallweit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox