0002-serial-uapi-Add-support-for-bus-termination.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. From 78c076f026667f9a94592c54339b21af5ae09201 Mon Sep 17 00:00:00 2001
  2. From: Jan Kiszka <jan.kiszka@siemens.com>
  3. Date: Tue, 26 Jul 2016 20:31:09 +0200
  4. Subject: [PATCH 02/27] serial: uapi: Add support for bus termination
  5. The Siemens IOT2000 comes with a RS485 interface that allows to enable
  6. or disable bus termination via software. Add a bit to the flags field of
  7. serial_rs485 that applications can set in order to request this feature
  8. from the hardware. This seems generic enough to add it for everyone.
  9. Existing driver will simply ignore it when set.
  10. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  11. ---
  12. include/uapi/linux/serial.h | 3 +++
  13. 1 file changed, 3 insertions(+)
  14. diff --git a/include/uapi/linux/serial.h b/include/uapi/linux/serial.h
  15. index 25331f9faa76..7934e3247b45 100644
  16. --- a/include/uapi/linux/serial.h
  17. +++ b/include/uapi/linux/serial.h
  18. @@ -121,6 +121,9 @@ struct serial_rs485 {
  19. #define SER_RS485_RTS_AFTER_SEND (1 << 2) /* Logical level for
  20. RTS pin after sent*/
  21. #define SER_RS485_RX_DURING_TX (1 << 4)
  22. +#define SER_RS485_TERMINATE_BUS (1 << 5) /* Enable bus
  23. + termination
  24. + (if supported) */
  25. __u32 delay_rts_before_send; /* Delay before send (milliseconds) */
  26. __u32 delay_rts_after_send; /* Delay after send (milliseconds) */
  27. __u32 padding[5]; /* Memory is cheap, new structs
  28. --
  29. 2.12.0