]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
spi: define SPI_XFER_ONCE
authorNikita Kiryanov <nikita@compulab.co.il>
Wed, 16 Oct 2013 14:23:26 +0000 (17:23 +0300)
committerAnatolij Gustschin <agust@denx.de>
Tue, 12 Nov 2013 09:03:45 +0000 (10:03 +0100)
The flag combination "SPI_XFER_BEGIN | SPI_XFER_END" is a common use
case of spi_xfer, and it can easily cause an already long line (spi_xfer
takes 5 parameters) to go over the 80 character limit.

define SPI_XFER_ONCE to be a shorter version of the above flag combination.

Cc: Tom Rini <trini@ti.com>
Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
include/spi.h

index 67da75cb59bce28628d4eac12f16f5946912fff3..e2563c99f24f7260f79182ed45dbde4ff7a0f9ed 100644 (file)
@@ -29,6 +29,7 @@
 #define SPI_XFER_END           0x02    /* Deassert CS after transfer */
 #define SPI_XFER_MMAP          0x08    /* Memory Mapped start */
 #define SPI_XFER_MMAP_END      0x10    /* Memory Mapped End */
+#define SPI_XFER_ONCE          (SPI_XFER_BEGIN | SPI_XFER_END)
 
 /* Header byte that marks the start of the message */
 #define SPI_PREAMBLE_END_BYTE  0xec