From: "Janusz Użycki" <j.uzycki@elproma.com.pl>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Walleij <linus.walleij@linaro.org>,
Alexander Shiyan <shc_work@mail.ru>,
fabio.estevam@freescale.com,
Richard Genoud <richard.genoud@gmail.com>,
Fabio Estevam <festevam@gmail.com>,
linux-serial@vger.kernel.org, linux-gpio@vger.kernel.org,
Alexandre Courbot <gnurou@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH v2 2/4] serial: mxs-auart: Use helpers for gpio irqs
Date: Tue, 13 Jan 2015 10:48:47 +0100 [thread overview]
Message-ID: <54B4E9FF.5090003@elproma.com.pl> (raw)
In-Reply-To: <20150113093524.GI22880@pengutronix.de>
W dniu 2015-01-13 o 10:35, Uwe Kleine-König pisze:
> Hello,
>
> On Tue, Jan 13, 2015 at 10:29:44AM +0100, Janusz Użycki wrote:
>> W dniu 2015-01-13 o 09:08, Uwe Kleine-König pisze:
>>> Hello,
>>>
>>> On Sat, Jan 10, 2015 at 03:32:44PM +0100, Janusz Uzycki wrote:
>>>> The patch updates mxs-auart driver to use new mctrl_gpio helpers for
>>>> gpio irqs. The code is much simpler now.
>>>>
>>>> Signed-off-by: Janusz Uzycki <j.uzycki@elproma.com.pl>
>>>> ---
>>>>
>>>> There is no changes since v1 (rebased only).
>>>>
>>>> ---
>>>> drivers/tty/serial/mxs-auart.c | 133 ++++-------------------------------------
>>>> 1 file changed, 13 insertions(+), 120 deletions(-)
>>> Very nice!
>>>
>>>> diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
>>>> index ec553f8..2ddba69 100644
>>>> --- a/drivers/tty/serial/mxs-auart.c
>>>> +++ b/drivers/tty/serial/mxs-auart.c
>>>> [...]
>>>> @@ -483,18 +458,9 @@ static void mxs_auart_enable_ms(struct uart_port *port)
>>>> s->ms_irq_enabled = true;
>>>> - if (s->gpio_irq[UART_GPIO_CTS] >= 0)
>>>> - enable_irq(s->gpio_irq[UART_GPIO_CTS]);
>>>> - /* TODO: enable AUART_INTR_CTSMIEN otherwise */
>>>> -
>>>> - if (s->gpio_irq[UART_GPIO_DSR] >= 0)
>>>> - enable_irq(s->gpio_irq[UART_GPIO_DSR]);
>>>> -
>>>> - if (s->gpio_irq[UART_GPIO_RI] >= 0)
>>>> - enable_irq(s->gpio_irq[UART_GPIO_RI]);
>>>> -
>>>> - if (s->gpio_irq[UART_GPIO_DCD] >= 0)
>>>> - enable_irq(s->gpio_irq[UART_GPIO_DCD]);
>>>> + mctrl_gpio_enable_ms(s->gpios);
>>>> + /* TODO: enable AUART_INTR_CTSMIEN
>>>> + * if s->gpios->irq[UART_GPIO_CTS] == 0 */
>>> What is the problem here? For the other lines nothing needs to be done?
>>> This comment doesn't match the coding style.
>> Right, the comment should be rather:
>> /* TODO: enable AUART_INTR_CTSMIEN
>> * if (!mctrl_gpio_is_gpio(atmel_port->gpios, UART_GPIO_CTS)) */
> I'd say:
>
> /*
> * TODO: enable AUART_INTR_CTSMIEN if CTS isn't handled by
> * mctrl_gpio.
> */
exactly, thanks
>
>> In this place I marked that CTSMIEN should be switched on
>> enable/disable_ms if CTS
>> is not a gpio. The driver enables CTSMIEN forever what is wrong but
>> I can't test it
>> and I don't need it so I've just marked the fact in the comment.
> That's what I thought. You're not affected because CTS is a gpio for
> you (or not?)? What would be the effect otherwise?
Yes, my CTS is a gpio.
CTSMIEN control CTS signal of auart block. There is a choice in DT:
- use auart block's CTS: hardware flow control works for all baud rates,
DMA can be used
- use gpio as CTS: hardware flow control is limited, DMA disabled but
CTS line is
not limited by hardware pinmux
Both options can't be set at once. I workarounded auart block's CTS irq
handler in condition:
"if (CTS_AT_AUART() && s->ms_irq_enabled)". Support by _ms would be more
elegance
but as I wrote I couldn't test all cases. Therefore the code for auart
block's CTS is preserved.
best regards
Janusz
>
> Best regards
> Uwe
>
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" 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: j.uzycki@elproma.com.pl (Janusz Użycki)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2 2/4] serial: mxs-auart: Use helpers for gpio irqs
Date: Tue, 13 Jan 2015 10:48:47 +0100 [thread overview]
Message-ID: <54B4E9FF.5090003@elproma.com.pl> (raw)
In-Reply-To: <20150113093524.GI22880@pengutronix.de>
W dniu 2015-01-13 o 10:35, Uwe Kleine-K?nig pisze:
> Hello,
>
> On Tue, Jan 13, 2015 at 10:29:44AM +0100, Janusz U?ycki wrote:
>> W dniu 2015-01-13 o 09:08, Uwe Kleine-K?nig pisze:
>>> Hello,
>>>
>>> On Sat, Jan 10, 2015 at 03:32:44PM +0100, Janusz Uzycki wrote:
>>>> The patch updates mxs-auart driver to use new mctrl_gpio helpers for
>>>> gpio irqs. The code is much simpler now.
>>>>
>>>> Signed-off-by: Janusz Uzycki <j.uzycki@elproma.com.pl>
>>>> ---
>>>>
>>>> There is no changes since v1 (rebased only).
>>>>
>>>> ---
>>>> drivers/tty/serial/mxs-auart.c | 133 ++++-------------------------------------
>>>> 1 file changed, 13 insertions(+), 120 deletions(-)
>>> Very nice!
>>>
>>>> diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
>>>> index ec553f8..2ddba69 100644
>>>> --- a/drivers/tty/serial/mxs-auart.c
>>>> +++ b/drivers/tty/serial/mxs-auart.c
>>>> [...]
>>>> @@ -483,18 +458,9 @@ static void mxs_auart_enable_ms(struct uart_port *port)
>>>> s->ms_irq_enabled = true;
>>>> - if (s->gpio_irq[UART_GPIO_CTS] >= 0)
>>>> - enable_irq(s->gpio_irq[UART_GPIO_CTS]);
>>>> - /* TODO: enable AUART_INTR_CTSMIEN otherwise */
>>>> -
>>>> - if (s->gpio_irq[UART_GPIO_DSR] >= 0)
>>>> - enable_irq(s->gpio_irq[UART_GPIO_DSR]);
>>>> -
>>>> - if (s->gpio_irq[UART_GPIO_RI] >= 0)
>>>> - enable_irq(s->gpio_irq[UART_GPIO_RI]);
>>>> -
>>>> - if (s->gpio_irq[UART_GPIO_DCD] >= 0)
>>>> - enable_irq(s->gpio_irq[UART_GPIO_DCD]);
>>>> + mctrl_gpio_enable_ms(s->gpios);
>>>> + /* TODO: enable AUART_INTR_CTSMIEN
>>>> + * if s->gpios->irq[UART_GPIO_CTS] == 0 */
>>> What is the problem here? For the other lines nothing needs to be done?
>>> This comment doesn't match the coding style.
>> Right, the comment should be rather:
>> /* TODO: enable AUART_INTR_CTSMIEN
>> * if (!mctrl_gpio_is_gpio(atmel_port->gpios, UART_GPIO_CTS)) */
> I'd say:
>
> /*
> * TODO: enable AUART_INTR_CTSMIEN if CTS isn't handled by
> * mctrl_gpio.
> */
exactly, thanks
>
>> In this place I marked that CTSMIEN should be switched on
>> enable/disable_ms if CTS
>> is not a gpio. The driver enables CTSMIEN forever what is wrong but
>> I can't test it
>> and I don't need it so I've just marked the fact in the comment.
> That's what I thought. You're not affected because CTS is a gpio for
> you (or not?)? What would be the effect otherwise?
Yes, my CTS is a gpio.
CTSMIEN control CTS signal of auart block. There is a choice in DT:
- use auart block's CTS: hardware flow control works for all baud rates,
DMA can be used
- use gpio as CTS: hardware flow control is limited, DMA disabled but
CTS line is
not limited by hardware pinmux
Both options can't be set at once. I workarounded auart block's CTS irq
handler in condition:
"if (CTS_AT_AUART() && s->ms_irq_enabled)". Support by _ms would be more
elegance
but as I wrote I couldn't test all cases. Therefore the code for auart
block's CTS is preserved.
best regards
Janusz
>
> Best regards
> Uwe
>
next prev parent reply other threads:[~2015-01-13 9:48 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-10 14:32 [RFC PATCH v2 1/4] tty: serial_mctrl_gpio: Add irqs helpers for input lines Janusz Uzycki
2015-01-10 14:32 ` Janusz Uzycki
2015-01-10 14:32 ` [RFC PATCH v2 2/4] serial: mxs-auart: Use helpers for gpio irqs Janusz Uzycki
2015-01-10 14:32 ` Janusz Uzycki
2015-01-13 8:08 ` Uwe Kleine-König
2015-01-13 8:08 ` Uwe Kleine-König
2015-01-13 9:29 ` Janusz Użycki
2015-01-13 9:29 ` Janusz Użycki
2015-01-13 9:35 ` Uwe Kleine-König
2015-01-13 9:35 ` Uwe Kleine-König
2015-01-13 9:48 ` Janusz Użycki [this message]
2015-01-13 9:48 ` Janusz Użycki
2015-01-10 14:32 ` [RFC PATCH v2 3/4] serial: at91: " Janusz Uzycki
2015-01-10 14:32 ` Janusz Uzycki
2015-01-13 16:08 ` Richard Genoud
2015-01-13 16:08 ` Richard Genoud
2015-01-14 16:10 ` Nicolas Ferre
2015-01-14 16:10 ` Nicolas Ferre
2015-01-19 10:14 ` Linus Walleij
2015-01-19 10:14 ` Linus Walleij
2015-01-10 14:32 ` [RFC PATCH v2 4/4] serial: clps711x: Update to new mctrl_gpio_init_dt Janusz Uzycki
2015-01-10 14:32 ` Janusz Uzycki
2015-01-12 22:25 ` [RFC PATCH v2 1/4] tty: serial_mctrl_gpio: Add irqs helpers for input lines Alexandre Courbot
2015-01-12 22:25 ` Alexandre Courbot
2015-01-13 8:03 ` Uwe Kleine-König
2015-01-13 8:03 ` Uwe Kleine-König
2015-01-13 9:20 ` Janusz Użycki
2015-01-13 9:20 ` Janusz Użycki
2015-01-13 13:04 ` Richard Genoud
2015-01-13 13:04 ` Richard Genoud
2015-01-13 13:52 ` Janusz Użycki
2015-01-13 13:52 ` Janusz Użycki
2015-01-13 14:30 ` Richard Genoud
2015-01-13 14:30 ` Richard Genoud
2015-01-13 14:33 ` Janusz Użycki
2015-01-13 14:33 ` Janusz Użycki
2015-01-13 14:41 ` Richard Genoud
2015-01-13 14:41 ` Richard Genoud
2015-01-13 14:44 ` Janusz Użycki
2015-01-13 14:44 ` Janusz Użycki
2015-01-22 10:33 ` Janusz Użycki
2015-01-22 10:33 ` Janusz Użycki
2015-01-22 11:37 ` Fabio Estevam
2015-01-22 11:37 ` Fabio Estevam
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=54B4E9FF.5090003@elproma.com.pl \
--to=j.uzycki@elproma.com.pl \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
--cc=gnurou@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.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.