mbox series

[v3,0/2] rs485 bus termination GPIO

Message ID cover.1589811297.git.lukas@wunner.de
Headers show
Series rs485 bus termination GPIO | expand

Message

Lukas Wunner May 18, 2020, 2:45 p.m. UTC
Define a device tree binding for an rs485 bus termination GPIO
(patch [1/2]), amend the serial core to retrieve the GPIO from
the device tree and amend the default ->rs485_config() callback
for 8250 drivers to change the GPIO on request from user space
(patch [2/2]).


Changes v2 -> v3:

* Patch [2/2]:
  * Drop unnecessary NULL pointer check preceding gpiod_set_value(). (Heiko)
  * Amend commit message to suggest moving 8250_exar.c to new binding. (Andy)
    Add Jan to Cc and Andy's R-b tag.

Changes v1 -> v2:

* Patch [2/2]:
  * Drop unnecessary devm_gpiod_put(). (Andy)
  * Use GPIOD_OUT_LOW macro for brevity. (Andy)
  * Document the rationale for disabling termination by default.
  * Drop nonsensical read of GPIO after setting its direction to out.


Link to v2:
https://lore.kernel.org/linux-serial/cover.1589285873.git.lukas@wunner.de


Lukas Wunner (2):
  dt-bindings: serial: Add binding for rs485 bus termination GPIO
  serial: 8250: Support rs485 bus termination GPIO

 .../devicetree/bindings/serial/rs485.yaml        |  4 ++++
 drivers/tty/serial/8250/8250_port.c              |  3 +++
 drivers/tty/serial/serial_core.c                 | 16 ++++++++++++++++
 include/linux/serial_core.h                      |  2 ++
 4 files changed, 25 insertions(+)