aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/uapi/linux/spi
diff options
context:
space:
mode:
authorJan Kundrát <jan.kundrat@cesnet.cz>2019-03-07 15:29:42 +0100
committerMark Brown <broonie@kernel.org>2019-03-18 12:18:28 +0000
commit2ed6692e8ce924346c3aab5585b07005adb30625 (patch)
tree9c77ba50e365714bc1d4e5cfd5dfee6382cc416b /include/uapi/linux/spi
parentspi: lpspi: Code cleanup (diff)
downloadwireguard-linux-2ed6692e8ce924346c3aab5585b07005adb30625.tar.xz
wireguard-linux-2ed6692e8ce924346c3aab5585b07005adb30625.zip
spi: spidev: Enable control of inter-word delays
Commit b7bb367afa4b added support for inserting delays in between individual words within a single SPI transaction. This makes it accessible from userspace. WARNING: This delay is silently ignored unless the SPI controller implements extra support for it. This is similar to how the in-kernel users handle the other existing property, spi_transfer->word_delay. Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/uapi/linux/spi')
-rw-r--r--include/uapi/linux/spi/spidev.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/uapi/linux/spi/spidev.h b/include/uapi/linux/spi/spidev.h
index c4253f0090d8..ee0f2460bff6 100644
--- a/include/uapi/linux/spi/spidev.h
+++ b/include/uapi/linux/spi/spidev.h
@@ -66,6 +66,9 @@
* @delay_usecs: If nonzero, how long to delay after the last bit transfer
* before optionally deselecting the device before the next transfer.
* @cs_change: True to deselect device before starting the next transfer.
+ * @word_delay_usecs: If nonzero, how long to wait between words within one
+ * transfer. This property needs explicit support in the SPI controller,
+ * otherwise it is silently ignored.
*
* This structure is mapped directly to the kernel spi_transfer structure;
* the fields have the same meanings, except of course that the pointers
@@ -100,7 +103,8 @@ struct spi_ioc_transfer {
__u8 cs_change;
__u8 tx_nbits;
__u8 rx_nbits;
- __u16 pad;
+ __u8 word_delay_usecs;
+ __u8 pad;
/* If the contents of 'struct spi_ioc_transfer' ever change
* incompatibly, then the ioctl number (currently 0) must change;