linux/Documentation/driver-api/serial
Ilpo Järvinen be2e2cb1d2 serial: Sanitize rs485_struct
Sanitize serial_rs485 struct before calling into rs485_setup. The
drivers provide supported_rs485 to help sanitization of the fields.

If neither of SER_RS485_RTS_ON_SEND or SER_RS485_RTS_AFTER_SEND
supported, don't pretend they can be set to sane settings but clear
them both instead. If only one of them is supported it may look
tempting to use the one driver supports to set the other, however, the
userspace does not have that information readily available so it
wouldn't be helpful.

While adjusting the documentation, remove also the claim that
TIOCGRS485 would call driver specific code. In reality, it does nothing
else than copies the stored serial_rs485 structure from uart_port to
userspace.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220606100433.13793-23-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10 13:49:57 +02:00
..
driver.rst Documentation: move tty to driver-api 2022-04-14 18:24:23 +02:00
index.rst Documentation: tty: move moxa-smartio.rst to tty 2022-04-14 18:24:24 +02:00
serial-iso7816.rst docs: serial: move it to the driver-api 2019-07-15 11:03:03 -03:00
serial-rs485.rst serial: Sanitize rs485_struct 2022-06-10 13:49:57 +02:00