summaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 13:23:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 13:23:53 -0700
commitc12ac9f98ec08d6eb69f84e3f72241d56a8b0822 (patch)
tree8c749a097e54a93e22b0a099c38d60135022a221 /include/uapi
parent3786075b5ebc8c4eaefd9e3ebf72883934fb64b3 (diff)
parent45b15d98a96ffdb3c608bdad952f51930c151420 (diff)
downloadlinux-c12ac9f98ec08d6eb69f84e3f72241d56a8b0822.tar.bz2
Merge tag 'spi-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi Updates from Mark Brown: "A busy release for both cleanups and new drivers this time along with further factoring out of replicated code into the core: - Provide support in the core for DMA mapping transfers - essentially all drivers weren't implementing this properly, now there's no excuse. - Dual and quad mode support for spidev. - Fix handling of cs_change in the generic implementation. - Remove the S3C_DMA code from the s3c64xx driver now that all the platforms using it have been converted to dmaengine. - Lots of improvements to the Renesas SPI controllers. - Drivers for Allwinner A10 and A31, Qualcomm QUP and Xylinx xtfpga. - Removal of the bitrotted ti-ssp driver" * tag 'spi-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (199 commits) spi: Fix handling of cs_change in core implementation spi: bitbang: Make spi_bitbang_stop() return void spi: mpc52xx: Convert to use bits_per_word_mask spi: omap-100k: Fix memory leak spi: dw: Don't call kfree for memory allocated by devm_kzalloc spi: fsl-dspi: Fix memory leak spi: omap-uwire: add missing iounmap spi: clps711x: Convert to use master->max_speed_hz spi: clps711x: Enable driver compilation with COMPILE_TEST spi: omap-uwire: Remove full duplex check spi: Do not require a completion spi: topcliff-pch: Transform noisy message to dev_vdbg spi: coldfire-qspi: Simplify the code to set register bits for transfer speed spi: bcm63xx: Remove unused define for PFX spi: efm32: use $vendor,$device scheme for compatible string spi: clps711x: Remove <mach/hardware.h> dependency spi: topcliff-pch: Properly unregister platform devices on probe() error paths spi: fsl-espi: Remove unused bits_per_word variable in fsl_espi_bufs spi: altera: Remove the code to get unused platform_data spi: fsl-lib: Fix memory leak of pinfo ...
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/spi/spidev.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/uapi/linux/spi/spidev.h b/include/uapi/linux/spi/spidev.h
index 52d9ed01855f..dd5f21e75805 100644
--- a/include/uapi/linux/spi/spidev.h
+++ b/include/uapi/linux/spi/spidev.h
@@ -42,6 +42,10 @@
#define SPI_LOOP 0x20
#define SPI_NO_CS 0x40
#define SPI_READY 0x80
+#define SPI_TX_DUAL 0x100
+#define SPI_TX_QUAD 0x200
+#define SPI_RX_DUAL 0x400
+#define SPI_RX_QUAD 0x800
/*---------------------------------------------------------------------------*/
@@ -92,7 +96,9 @@ struct spi_ioc_transfer {
__u16 delay_usecs;
__u8 bits_per_word;
__u8 cs_change;
- __u32 pad;
+ __u8 tx_nbits;
+ __u8 rx_nbits;
+ __u16 pad;
/* If the contents of 'struct spi_ioc_transfer' ever change
* incompatibly, then the ioctl number (currently 0) must change;
@@ -110,7 +116,7 @@ struct spi_ioc_transfer {
#define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)])
-/* Read / Write of SPI mode (SPI_MODE_0..SPI_MODE_3) */
+/* Read / Write of SPI mode (SPI_MODE_0..SPI_MODE_3) (limited to 8 bits) */
#define SPI_IOC_RD_MODE _IOR(SPI_IOC_MAGIC, 1, __u8)
#define SPI_IOC_WR_MODE _IOW(SPI_IOC_MAGIC, 1, __u8)
@@ -126,6 +132,10 @@ struct spi_ioc_transfer {
#define SPI_IOC_RD_MAX_SPEED_HZ _IOR(SPI_IOC_MAGIC, 4, __u32)
#define SPI_IOC_WR_MAX_SPEED_HZ _IOW(SPI_IOC_MAGIC, 4, __u32)
+/* Read / Write of the SPI mode field */
+#define SPI_IOC_RD_MODE32 _IOR(SPI_IOC_MAGIC, 5, __u32)
+#define SPI_IOC_WR_MODE32 _IOW(SPI_IOC_MAGIC, 5, __u32)
+
#endif /* SPIDEV_H */