Commit 891e9993 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Greg Kroah-Hartman

Documentation: rs485: Fix struct referencing

Use "struct serial_rs485" to get the references properly recognized.
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: default avatarBagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20221019093343.9546-5-ilpo.jarvinen@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0f4648a1
...@@ -29,7 +29,7 @@ RS485 Serial Communications ...@@ -29,7 +29,7 @@ RS485 Serial Communications
3. Data Structures Already Available in the Kernel 3. Data Structures Already Available in the Kernel
================================================== ==================================================
The Linux kernel provides the serial_rs485 structure to handle RS485 The Linux kernel provides the struct serial_rs485 to handle RS485
communications. This data structure is used to set and configure RS485 communications. This data structure is used to set and configure RS485
parameters in the platform data and in ioctls. parameters in the platform data and in ioctls.
...@@ -40,13 +40,14 @@ RS485 Serial Communications ...@@ -40,13 +40,14 @@ RS485 Serial Communications
Any driver for devices capable of working both as RS232 and RS485 should Any driver for devices capable of working both as RS232 and RS485 should
implement the rs485_config callback and provide rs485_supported in the implement the rs485_config callback and provide rs485_supported in the
uart_port structure. The serial core calls rs485_config to do the device struct uart_port. The serial core calls rs485_config to do the device
specific part in response to TIOCSRS485 ioctl (see below). The rs485_config specific part in response to TIOCSRS485 ioctl (see below). The
callback receives a pointer to a sanitizated serial_rs485 structure. The rs485_config callback receives a pointer to a sanitizated struct
serial_rs485 userspace provides is sanitized before calling rs485_config serial_rs485. The struct serial_rs485 userspace provides is sanitized
using rs485_supported that indicates what RS485 features the driver supports before calling rs485_config using rs485_supported that indicates what
for the uart_port. TIOCGRS485 ioctl can be used to read back the RS485 features the driver supports for the struct uart_port. TIOCGRS485
serial_rs485 structure matching to the current configuration. ioctl can be used to read back the struct serial_rs485 matching to the
current configuration.
.. kernel-doc:: include/uapi/linux/serial.h .. kernel-doc:: include/uapi/linux/serial.h
:identifiers: serial_rs485 uart_get_rs485_mode :identifiers: serial_rs485 uart_get_rs485_mode
...@@ -108,8 +109,8 @@ RS485 Serial Communications ...@@ -108,8 +109,8 @@ RS485 Serial Communications
The Linux kernel provides addressing mode for multipoint RS-485 serial The Linux kernel provides addressing mode for multipoint RS-485 serial
communications line. The addressing mode is enabled with SER_RS485_ADDRB communications line. The addressing mode is enabled with SER_RS485_ADDRB
flag in serial_rs485. Struct serial_rs485 has two additional flags and flag in struct serial_rs485. The struct serial_rs485 has two additional
fields for enabling receive and destination addresses. flags and fields for enabling receive and destination addresses.
Address mode flags: Address mode flags:
- SER_RS485_ADDRB: Enabled addressing mode (sets also ADDRB in termios). - SER_RS485_ADDRB: Enabled addressing mode (sets also ADDRB in termios).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment