aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorMark Brown <[email protected]>2023-05-30 17:43:31 +0100
committerMark Brown <[email protected]>2023-05-30 17:43:31 +0100
commitfe73245592fef75a7c41180a3fbb07c9a75f622e (patch)
tree2b4964fcd8f518de998ffe57f1dfff63a16cf60f /include/uapi/linux
parent0bbb363f86f2215571741bc945f6b9ec132ea1b8 (diff)
parentb229a7f530ebea90c8e21b56872f3102e3d54461 (diff)
spi: add SPI_MOSI_IDLE_LOW mode bit
Merge series from Boerge Struempfel <[email protected]>: Some spi controller switch the mosi line to high, whenever they are idle. This may not be desired in all use cases. For example neopixel leds can get confused and flicker due to misinterpreting the idle state. Therefore, we introduce a new spi-mode bit, with which the idle behaviour can be overwritten on a per device basis.
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/spi/spi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/spi/spi.h b/include/uapi/linux/spi/spi.h
index 9d5f58059703..ca56e477d161 100644
--- a/include/uapi/linux/spi/spi.h
+++ b/include/uapi/linux/spi/spi.h
@@ -28,6 +28,7 @@
#define SPI_RX_OCTAL _BITUL(14) /* receive with 8 wires */
#define SPI_3WIRE_HIZ _BITUL(15) /* high impedance turnaround */
#define SPI_RX_CPHA_FLIP _BITUL(16) /* flip CPHA on Rx only xfer */
+#define SPI_MOSI_IDLE_LOW _BITUL(17) /* leave mosi line low when idle */
/*
* All the bits defined above should be covered by SPI_MODE_USER_MASK.
@@ -37,6 +38,6 @@
* These bits must not overlap. A static assert check should make sure of that.
* If adding extra bits, make sure to increase the bit index below as well.
*/
-#define SPI_MODE_USER_MASK (_BITUL(17) - 1)
+#define SPI_MODE_USER_MASK (_BITUL(18) - 1)
#endif /* _UAPI_SPI_H */