diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2014-11-06 16:46:13 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-06 17:58:53 -0500 |
commit | a5f276f10ff70da89b349df445e944c8cd87956c (patch) | |
tree | 97654f0c9783f14136af81b33a8171deb62ba106 /include/linux/serial_core.h | |
parent | 7f1dc2f384792f271833cd89a8608d189b63ea6d (diff) |
serial_core: Handle TIOC[GS]RS485 ioctls.
The following drivers: 8250_core, atmel_serial, max310x, mcf, omap-serial
and sci16is7xx implement code to handle RS485 ioctls.
In order to avoid code duplication, we implement a simple ioctl handler
on the serial_core layer.
This handler can be used by all the other drivers instead of duplicating
code.
Until this is the only RS485 ioctl handler, it will try first the
rs485_config callback and if it is not present it will call the driver
specific ioctl.
Reviewed-by: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r-- | include/linux/serial_core.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 40b4cc4f8e1d..3231a43f6acf 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -131,6 +131,8 @@ struct uart_port { | |||
131 | void (*pm)(struct uart_port *, unsigned int state, | 131 | void (*pm)(struct uart_port *, unsigned int state, |
132 | unsigned int old); | 132 | unsigned int old); |
133 | void (*handle_break)(struct uart_port *); | 133 | void (*handle_break)(struct uart_port *); |
134 | int (*rs485_config)(struct uart_port *, | ||
135 | struct serial_rs485 *rs485); | ||
134 | unsigned int irq; /* irq number */ | 136 | unsigned int irq; /* irq number */ |
135 | unsigned long irqflags; /* irq flags */ | 137 | unsigned long irqflags; /* irq flags */ |
136 | unsigned int uartclk; /* base uart clock */ | 138 | unsigned int uartclk; /* base uart clock */ |
@@ -231,6 +233,7 @@ struct uart_port { | |||
231 | unsigned char unused[2]; | 233 | unsigned char unused[2]; |
232 | struct attribute_group *attr_group; /* port specific attributes */ | 234 | struct attribute_group *attr_group; /* port specific attributes */ |
233 | const struct attribute_group **tty_groups; /* all attributes (serial core use only) */ | 235 | const struct attribute_group **tty_groups; /* all attributes (serial core use only) */ |
236 | struct serial_rs485 rs485; | ||
234 | void *private_data; /* generic platform data pointer */ | 237 | void *private_data; /* generic platform data pointer */ |
235 | }; | 238 | }; |
236 | 239 | ||