summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/serial.h
diff options
context:
space:
mode:
authorJan Kiszka2017-05-13 09:29:04 +0200
committerGreg Kroah-Hartman2017-05-18 16:34:55 +0200
commite8759ad17d41913dfeb49736ca7fbfbc96f32c54 (patch)
tree3acd33e2020aeeba4bbc51ea16946181234ba875 /include/uapi/linux/serial.h
parentserial: pch_uart: use offset_in_page() macro (diff)
downloadkernel-qcow2-linux-e8759ad17d41913dfeb49736ca7fbfbc96f32c54.tar.gz
kernel-qcow2-linux-e8759ad17d41913dfeb49736ca7fbfbc96f32c54.tar.xz
kernel-qcow2-linux-e8759ad17d41913dfeb49736ca7fbfbc96f32c54.zip
serial: uapi: Add support for bus termination
The Siemens IOT2040 comes with a RS485 interface that allows to enable or disable bus termination via software. Add a bit to the flags field of serial_rs485 that applications can set in order to request this feature from the hardware. This seems generic enough to add it for everyone. Existing driver will simply ignore it when set. Signed-off-by: Sascha Weisenberger <sascha.weisenberger@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/linux/serial.h')
-rw-r--r--include/uapi/linux/serial.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/serial.h b/include/uapi/linux/serial.h
index 5d59c3ebf459..d2667ecd54ac 100644
--- a/include/uapi/linux/serial.h
+++ b/include/uapi/linux/serial.h
@@ -122,6 +122,9 @@ struct serial_rs485 {
#define SER_RS485_RTS_AFTER_SEND (1 << 2) /* Logical level for
RTS pin after sent*/
#define SER_RS485_RX_DURING_TX (1 << 4)
+#define SER_RS485_TERMINATE_BUS (1 << 5) /* Enable bus
+ termination
+ (if supported) */
__u32 delay_rts_before_send; /* Delay before send (milliseconds) */
__u32 delay_rts_after_send; /* Delay after send (milliseconds) */
__u32 padding[5]; /* Memory is cheap, new structs