From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Richard Genoud <richard.genoud@gmail.com>,
Alexander Shiyan <shc_work@mail.ru>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 5/8] tty/serial: at91: add dtr control via gpio
Date: Mon, 10 Feb 2014 11:37:56 +0100 [thread overview]
Message-ID: <52F8AC04.50103@atmel.com> (raw)
In-Reply-To: <CACQ1gAjQi+g0=HcR9K0rBQxBUZ_cN783sCWx40P5Hec-BdRtVg@mail.gmail.com>
On 10/02/2014 11:24, Richard Genoud :
> 2014-02-07 16:21 GMT+01:00 Alexander Shiyan <shc_work@mail.ru>:
>> Hello.
>>
>> Пятница, 7 февраля 2014, 15:59 +01:00 от Richard Genoud <richard.genoud@gmail.com>:
>>> On sam9x5, the USART controller doesn't handle DTR/DSR/DCD/RI signals,
>>> so we have to control them via GPIO.
>>>
>>> This patch permits to use a GPIO to control the DTR signal.
>>>
>>> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
>>> ---
>> ...
>>> + if (gpio_is_valid(atmel_port->gpio.dtr)) {
>>> + if (mctrl & TIOCM_DTR)
>>> + gpio_set_value(atmel_port->gpio.dtr, 0);
>>> + else
>>> + gpio_set_value(atmel_port->gpio.dtr, 1);
>>> + }
>>
>> So, if you use GPIO for such purpose (here and in the other patches),
>> you should take and use GPIO active level from bindings.
>> It will make use of GPIO more flexible and deliver us from further special
>> possible bindings to declare the active level.
> Yes, I could do that. I'll have to change the alreday merged RTS
> binding so that it gets it's active level from DTS, but I don't think
> it's a problem, since it's not already in mainline.
> Linus, Nicolas, what do you think ?
Yes I agree. It is not used yet, so the sooner we move to this
specification, the better.
>> Actually, it would be good to have a separate unit for mctrl GPIOs,
>> which could be used for other drivers.
> good idea, I can add them in serial_core.c
That would be great. Thanks Richard!
Bye,
--
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/8] tty/serial: at91: add dtr control via gpio
Date: Mon, 10 Feb 2014 11:37:56 +0100 [thread overview]
Message-ID: <52F8AC04.50103@atmel.com> (raw)
In-Reply-To: <CACQ1gAjQi+g0=HcR9K0rBQxBUZ_cN783sCWx40P5Hec-BdRtVg@mail.gmail.com>
On 10/02/2014 11:24, Richard Genoud :
> 2014-02-07 16:21 GMT+01:00 Alexander Shiyan <shc_work@mail.ru>:
>> Hello.
>>
>> ???????, 7 ??????? 2014, 15:59 +01:00 ?? Richard Genoud <richard.genoud@gmail.com>:
>>> On sam9x5, the USART controller doesn't handle DTR/DSR/DCD/RI signals,
>>> so we have to control them via GPIO.
>>>
>>> This patch permits to use a GPIO to control the DTR signal.
>>>
>>> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
>>> ---
>> ...
>>> + if (gpio_is_valid(atmel_port->gpio.dtr)) {
>>> + if (mctrl & TIOCM_DTR)
>>> + gpio_set_value(atmel_port->gpio.dtr, 0);
>>> + else
>>> + gpio_set_value(atmel_port->gpio.dtr, 1);
>>> + }
>>
>> So, if you use GPIO for such purpose (here and in the other patches),
>> you should take and use GPIO active level from bindings.
>> It will make use of GPIO more flexible and deliver us from further special
>> possible bindings to declare the active level.
> Yes, I could do that. I'll have to change the alreday merged RTS
> binding so that it gets it's active level from DTS, but I don't think
> it's a problem, since it's not already in mainline.
> Linus, Nicolas, what do you think ?
Yes I agree. It is not used yet, so the sooner we move to this
specification, the better.
>> Actually, it would be good to have a separate unit for mctrl GPIOs,
>> which could be used for other drivers.
> good idea, I can add them in serial_core.c
That would be great. Thanks Richard!
Bye,
--
Nicolas Ferre
next prev parent reply other threads:[~2014-02-10 10:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 14:59 [PATCH 0/8] tty/serial: at91: Add missing modem signals to atmel_serial Richard Genoud
2014-02-07 14:59 ` Richard Genoud
2014-02-07 14:59 ` [PATCH 1/8] tty/serial: at91: use dev_err instead of printk Richard Genoud
2014-02-07 14:59 ` Richard Genoud
2014-02-07 14:59 ` [PATCH 2/8] tty/serial: at91: remove unused open/close hooks Richard Genoud
2014-02-07 14:59 ` Richard Genoud
2014-02-07 14:59 ` [PATCH 3/8] tty/serial: at91: prepare for more gpio lines to come Richard Genoud
2014-02-07 14:59 ` Richard Genoud
2014-02-07 14:59 ` [PATCH 4/8] tty/serial: at91: add cts control via gpio Richard Genoud
2014-02-07 14:59 ` Richard Genoud
2014-02-07 14:59 ` [PATCH 5/8] tty/serial: at91: add dtr " Richard Genoud
2014-02-07 14:59 ` Richard Genoud
2014-02-07 15:21 ` Alexander Shiyan
2014-02-07 15:21 ` Alexander Shiyan
2014-02-10 10:24 ` Richard Genoud
2014-02-10 10:24 ` Richard Genoud
2014-02-10 10:37 ` Nicolas Ferre [this message]
2014-02-10 10:37 ` Nicolas Ferre
2014-02-07 14:59 ` [PATCH 6/8] tty/serial: at91: add dsr " Richard Genoud
2014-02-07 14:59 ` Richard Genoud
2014-02-07 14:59 ` [PATCH 7/8] tty/serial: at91: add ring " Richard Genoud
2014-02-07 14:59 ` Richard Genoud
2014-02-07 14:59 ` [PATCH 8/8] tty/serial: at91: add dcd " Richard Genoud
2014-02-07 14:59 ` 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=52F8AC04.50103@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=richard.genoud@gmail.com \
--cc=shc_work@mail.ru \
--cc=u.kleine-koenig@pengutronix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.