From: Richard Genoud <richard.genoud@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Yegor Yefremov <yegor_sub1@visionsystems.de>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Linus Walleij <linus.walleij@linaro.org>,
Alexander Shiyan <shc_work@mail.ru>,
linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Richard Genoud <richard.genoud@gmail.com>
Subject: [PATCH RESEND 0/5] tty/serial: Add helpers to use GPIOs to control modem lines and implement atmel_serial.c
Date: Tue, 13 May 2014 20:20:40 +0200 [thread overview]
Message-ID: <1400005245-11943-1-git-send-email-richard.genoud@gmail.com> (raw)
This patch series is a leftover of http://www.spinics.net/lists/arm-kernel/msg314242.html
that missed 3.15 because it caused merge conflicts.
The USART controllers on sam9x5 chips (and also all AT91/SAMA5 chips
but at91rm9200) are not capable of handling DTR/DSR/DCD/RI signal.
Moreover, even if the controller can handle CTS/RTS, the dedicated
CTS/RTS pins may be already muxed for other peripherals (LCDC/EMAC/MMC).
So this patchset adds the possibility to control those lines via GPIO,
as it is done for RTS in the patch "switch atmel serial to use gpiolib"
NB: The 1st patch should make it for 3.15-final since it corrects a
device tree binding documentation example that has been introduced in 3.15-rc1.
Patch 1: For 3.15-final: fix GPIO_ACTIVE_LOW usage in device-tree documentation.
Patch 2: For 3.16: implements at91_gpiolib_get_direction used in patch 4
Patch 3: For 3.16: implements the generic helpers to control modem lines via GPIO.
Patch 4: For 3.16: implements modem control lines in atmel_serial atmel_serial.
Patch 5: For 3.16: implements the interrupts of CTS/DSR/DCD/RI.
This is based on v3.15-rc5.
Tested on at91sam9g35, with a null modem cable between 2 serial ports,
one with CTS/RTS controlled by the USART controller, the other via GPIO,
full duplex transfers.
Did some tests also with null modem cables on a PC, and with real modems.
Richard Genoud (5):
tty/serial: atmel_serial: Fix device tree documentation
ARM: at91: gpio: implement get_direction
tty/serial: Add GPIOLIB helpers for controlling modem lines
tty/serial: at91: use mctrl_gpio helpers
tty/serial: at91: add interrupts for modem control lines
.../devicetree/bindings/serial/atmel-usart.txt | 12 +-
Documentation/serial/driver | 25 +++
arch/arm/mach-at91/at91rm9200_devices.c | 16 +-
arch/arm/mach-at91/at91sam9260_devices.c | 7 -
arch/arm/mach-at91/at91sam9261_devices.c | 4 -
arch/arm/mach-at91/at91sam9263_devices.c | 4 -
arch/arm/mach-at91/at91sam9g45_devices.c | 5 -
arch/arm/mach-at91/at91sam9rl_devices.c | 5 -
arch/arm/mach-at91/gpio.c | 13 ++
drivers/tty/serial/Kconfig | 4 +
drivers/tty/serial/Makefile | 3 +
drivers/tty/serial/atmel_serial.c | 230 ++++++++++++++++----
drivers/tty/serial/serial_mctrl_gpio.c | 143 ++++++++++++
drivers/tty/serial/serial_mctrl_gpio.h | 110 ++++++++++
include/linux/platform_data/atmel.h | 1 -
15 files changed, 509 insertions(+), 73 deletions(-)
create mode 100644 drivers/tty/serial/serial_mctrl_gpio.c
create mode 100644 drivers/tty/serial/serial_mctrl_gpio.h
--
1.7.10.4
next reply other threads:[~2014-05-13 18:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 18:20 Richard Genoud [this message]
2014-05-13 18:20 ` [PATCH RESEND 1/5] tty/serial: atmel_serial: Fix device tree documentation Richard Genoud
2014-05-13 18:20 ` [PATCH RESEND 2/5] ARM: at91: gpio: implement get_direction Richard Genoud
2014-05-13 18:20 ` [PATCH RESEND 3/5] tty/serial: Add GPIOLIB helpers for controlling modem lines Richard Genoud
2014-05-20 9:26 ` Yegor Yefremov
2014-05-28 19:45 ` Greg Kroah-Hartman
2014-05-28 19:47 ` Greg Kroah-Hartman
2014-05-13 18:20 ` [PATCH RESEND 4/5] tty/serial: at91: use mctrl_gpio helpers Richard Genoud
2014-05-13 18:20 ` [PATCH RESEND 5/5] tty/serial: at91: add interrupts for modem control lines Richard Genoud
2014-08-10 19:33 ` Peter Hurley
2014-09-01 9:26 ` Richard Genoud
2014-09-02 11:40 ` Peter Hurley
2014-09-03 10:50 ` Richard Genoud
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400005245-11943-1-git-send-email-richard.genoud@gmail.com \
--to=richard.genoud@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=shc_work@mail.ru \
--cc=yegor_sub1@visionsystems.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).