]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/spi/spi.h
Merge remote-tracking branch 'spi/fix/grant' into spi-linus
[karo-tx-linux.git] / include / linux / spi / spi.h
index c395f32b53b3ac47a7770edbd2357248b3537271..6ff26c8db7b923853527cee3ee1ffff1ca55bdd6 100644 (file)
@@ -228,6 +228,11 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
  *     every chipselect is connected to a slave.
  * @dma_alignment: SPI controller constraint on DMA buffers alignment.
  * @mode_bits: flags understood by this controller driver
+ * @bits_per_word_mask: A mask indicating which values of bits_per_word are
+ *     supported by the driver. Bit n indicates that a bits_per_word n+1 is
+ *     suported. If set, the SPI core will reject any transfer with an
+ *     unsupported bits_per_word. If not set, this value is simply ignored,
+ *     and it's up to the individual driver to perform any validation.
  * @flags: other constraints relevant to this driver
  * @bus_lock_spinlock: spinlock for SPI bus locking
  * @bus_lock_mutex: mutex for SPI bus locking
@@ -301,6 +306,9 @@ struct spi_master {
        /* spi_device.mode flags understood by this controller driver */
        u16                     mode_bits;
 
+       /* bitmask of supported bits_per_word for transfers */
+       u32                     bits_per_word_mask;
+
        /* other constraints relevant to this driver */
        u16                     flags;
 #define SPI_MASTER_HALF_DUPLEX BIT(0)          /* can't do full duplex */