From: Yu Tu <yu.tu@amlogic.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <linux-serial@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-amlogic@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, Jiri Slaby <jirislaby@kernel.org>,
Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Subject: Re: [PATCH 1/3] tty: serial: meson: modify request_irq and free_irq
Date: Wed, 22 Dec 2021 16:44:22 +0800 [thread overview]
Message-ID: <81e31307-609a-bab4-0241-33d574b7ef44@amlogic.com> (raw)
In-Reply-To: <YcGCj2jGpzl+sKcT@kroah.com>
On 2021/12/21 15:30, Greg Kroah-Hartman wrote:
> [ EXTERNAL EMAIL ]
>
> On Tue, Dec 21, 2021 at 03:16:32PM +0800, Yu Tu wrote:
>> Change request_irq to devm_request_irq and free_irq to devm_free_irq.
>> It's better to change the code this way.
>
> Why? What did this fix up? You still are manually requesting and
> freeing the irq. What bug did you fix?
>
I think this is exactly what you said. It's not necessary.
>>
>> The IRQF_SHARED interrupt flag was added because an interrupt error was
>> detected when the serial port was opened twice in a row on the project.
>
> That is a different change. Make that a different patch.
>
The main purpose of this change is that I found some users in the actual
project with the following usages:
(1)open(/dev/ttyAML0);
(2)open(/dev/ttyAML0);
The open function calls the meson_uart_startup function. If this is the
case, an interrupt error is reported.So So the IRQF_SHARED flag was added.
I'm going to do this for now, remove free_irq and request_irq
function,then add devm_request_irq in meson_uart_probe function.
This solves the above problem without adding IRQF_SHARED.
> thanks,
>
> greg k-h
>
next prev parent reply other threads:[~2021-12-22 8:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 7:16 [PATCH 0/3] the UART driver compatible with the Amlogic Meson S4 SoC Yu Tu
2021-12-21 7:16 ` [PATCH 1/3] tty: serial: meson: modify request_irq and free_irq Yu Tu
2021-12-21 7:30 ` Greg Kroah-Hartman
2021-12-22 8:44 ` Yu Tu [this message]
2021-12-21 7:16 ` [PATCH 2/3] tty: serial: meson: meson_uart_shutdown omit clear AML_UART_TX_EN bit Yu Tu
2021-12-21 7:32 ` Greg Kroah-Hartman
2021-12-22 9:01 ` Yu Tu
2021-12-21 7:16 ` [PATCH 3/3] tty: serial: meson: add UART driver compatible with S4 SoC on-chip Yu Tu
2021-12-21 7:34 ` Greg Kroah-Hartman
2021-12-22 9:28 ` Yu Tu
2021-12-24 17:25 ` Martin Blumenstingl
2021-12-27 6:56 ` Yu Tu
2021-12-27 11:58 ` Jerome Brunet
2021-12-27 20:04 ` Martin Blumenstingl
2021-12-28 11:24 ` Yu Tu
2021-12-21 7:30 ` [PATCH 0/3] the UART driver compatible with the Amlogic Meson S4 SoC Greg Kroah-Hartman
2021-12-22 8:19 ` Yu Tu
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=81e31307-609a-bab4-0241-33d574b7ef44@amlogic.com \
--to=yu.tu@amlogic.com \
--cc=gregkh@linuxfoundation.org \
--cc=jbrunet@baylibre.com \
--cc=jirislaby@kernel.org \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.com \
/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).