History

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.

Jan Kiszka committed 9 years ago

Commit e8759ad1 parent d1e06a41 file · +3 −0Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/serial.h+3−0
@@ -122,6 +122,9 @@ struct serial_rs485 { · 121 unmodified lines
122#define SER_RS485_RTS_AFTER_SEND (1 << 2) /* Logical level for122#define SER_RS485_RTS_AFTER_SEND (1 << 2) /* Logical level for
123 RTS pin after sent*/123 RTS pin after sent*/
124#define SER_RS485_RX_DURING_TX (1 << 4)124#define SER_RS485_RX_DURING_TX (1 << 4)
125#define SER_RS485_TERMINATE_BUS (1 << 5) /* Enable bus
126 termination
127 (if supported) */
125 __u32 delay_rts_before_send; /* Delay before send (milliseconds) */128 __u32 delay_rts_before_send; /* Delay before send (milliseconds) */
126 __u32 delay_rts_after_send; /* Delay after send (milliseconds) */129 __u32 delay_rts_after_send; /* Delay after send (milliseconds) */
127 __u32 padding[5]; /* Memory is cheap, new structs130 __u32 padding[5]; /* Memory is cheap, new structs