diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2014-08-05 05:45:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-08 18:26:26 -0400 |
commit | e676253b19b2d269cccf67fdb1592120a0cd0676 (patch) | |
tree | 34618c8fbe8069d007fb2a38ff8b2679dc6a10ea /include/linux/serial_8250.h | |
parent | 27d5775e75ec70c104479bd7fcdceb0d6e0203a8 (diff) |
serial/8250: Add support for RS485 IOCTLs
This patch allow the users of the 8250 infrastructure to define a
handler for RS485 configration.
If no handler is defined the 8250 driver will work as usual.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
--
v2:Change suggested by Alan "One Thousand Gnomes":
- Move rs485 structure further down on the uart_8250_port structure
drivers/tty/serial/8250/8250_core.c | 39 +++++++++++++++++++++++++++++++++++++
include/linux/serial_8250.h | 3 +++
2 files changed, 42 insertions(+)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serial_8250.h')
-rw-r--r-- | include/linux/serial_8250.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index f93649e22c43..6dd671765312 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
@@ -96,10 +96,13 @@ struct uart_8250_port { | |||
96 | unsigned char msr_saved_flags; | 96 | unsigned char msr_saved_flags; |
97 | 97 | ||
98 | struct uart_8250_dma *dma; | 98 | struct uart_8250_dma *dma; |
99 | struct serial_rs485 rs485; | ||
99 | 100 | ||
100 | /* 8250 specific callbacks */ | 101 | /* 8250 specific callbacks */ |
101 | int (*dl_read)(struct uart_8250_port *); | 102 | int (*dl_read)(struct uart_8250_port *); |
102 | void (*dl_write)(struct uart_8250_port *, int); | 103 | void (*dl_write)(struct uart_8250_port *, int); |
104 | int (*rs485_config)(struct uart_8250_port *, | ||
105 | struct serial_rs485 *rs485); | ||
103 | }; | 106 | }; |
104 | 107 | ||
105 | static inline struct uart_8250_port *up_to_u8250p(struct uart_port *up) | 108 | static inline struct uart_8250_port *up_to_u8250p(struct uart_port *up) |