[PATCH v5 0/4] tty/serial/8250: add MCTRL_GPIO support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>

This series adds MCTRL_GPIO support to 8250 driver. In order to do so
following changes had to be made:

* read/write calls to MCR register were put into new routines:
serial8250_out_MCR() and serial8250_in_MCR(). These new routines
now access both UARTs MCR register as also read/write GPIO pins
for RTS/DTR

* MCTRL_GPIO framwork had routines to set MCR and to read MSR, reading
MCR related GPIO signals was missing, hence mctrl_gpio_get_outputs()
routine was implemented

Issues:

* when 8250 driver is used with GPIOLIB disabled, mctrl_gpio_init()
return errors. This would render console unusable. Solution: ignore
mctrl_gpio_init() return value, if GPIOLIB is disabled.

* when 8250 driver is used as console, it sets DTR signale before
MCTL_GPIO API is initialized. This produces a kernel crash. Solution:
return from API calls, if mctrl_gpio structure is NULL i.e. not
initialized.

Yegor Yefremov (4):
  tty/serial/8250: make UART_MCR register access consistent
  serial: mctrl_gpio: add modem control read routine
  serial: mctrl_gpio: enable API usage only for initialized mctrl_gpios
    struct
  tty/serial/8250: use mctrl_gpio helpers

 Documentation/devicetree/bindings/serial/8250.txt | 19 ++++++++
 drivers/tty/serial/8250/8250.h                    | 43 ++++++++++++++++++
 drivers/tty/serial/8250/8250_core.c               |  9 ++++
 drivers/tty/serial/8250/8250_omap.c               | 35 ++++++++-------
 drivers/tty/serial/8250/8250_port.c               | 54 ++++++++++++-----------
 drivers/tty/serial/8250/Kconfig                   |  1 +
 drivers/tty/serial/serial_mctrl_gpio.c            | 36 +++++++++++++++
 drivers/tty/serial/serial_mctrl_gpio.h            | 15 ++++++-
 include/linux/serial_8250.h                       |  1 +
 9 files changed, 172 insertions(+), 41 deletions(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux