[PATCH v4 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. Also rework mctrl_gpio_init() to alwasy return NULL in case
of an error.

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               |  4 ++
 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            | 42 ++++++++++++++++--
 drivers/tty/serial/serial_mctrl_gpio.h            | 17 ++++++-
 include/linux/serial_8250.h                       |  1 +
 9 files changed, 171 insertions(+), 45 deletions(-)

-- 
2.1.4

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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux