From: Daniel Mack <daniel@zonque.org>
To: Maarten Brock <m.brock@vanmierlo.com>
Cc: devicetree@vger.kernel.org, linux-serial@vger.kernel.org,
gregkh@linuxfoundation.org, robh+dt@kernel.org, jslaby@suse.com,
pascal.huerst@gmail.com, linux-serial-owner@vger.kernel.org
Subject: Re: [PATCH 4/4] sc16is7xx: Use threaded IRQ
Date: Tue, 19 May 2020 19:37:52 +0200 [thread overview]
Message-ID: <c03101a9-ea8b-fdff-3f29-fd7c4f400019@zonque.org> (raw)
In-Reply-To: <b5d56abc8109fb3a7ef057c89a649f06@vanmierlo.com>
On 5/19/20 6:32 PM, Maarten Brock wrote:
> On 2020-05-18 18:57, Daniel Mack wrote:
>> It's a controller that sits behind another hardware bus itself, so
>> polling is expensive. If the controller would need to check for level
>> IRQs it would need to poll, and then we could as well just poll the UART
>> directly, that's just as good :)
>
> That depends on the IRQ coming out of the interrupt controller. If that is
> a level interrupt itself, then it is easy to see if all interrupts are
> handled. Further polling zooms in on the devices that require attention.
Yeah, I'm familiar with the concept, but it's not like that here,
unfortunately.
>> But again - the UART driver works perfectly fine with edge IRQs as long
>> as the interrupt is not shared.
>
> If you would require multiple sc16is7xx devices on I2C would you like to
> connect multiple interrupt lines? Or just SCL,SDA and *one* IRQ?
>
> OTOH for SPI you would require multiple CS already.
Right. Nevertheless, we can allow sharing the IRQ line for level-trigger
capable IRQ controllers, you're right.
>> What many drivers do is try with one setting, and if that fails because
>> the interrupt controller returns an error, they fall back to something
>> else. We could do the same here of course, but it'd be another patch on
>> top, as it's unrelated to the concrete change the patch we're commenting
>> on is bringing in.
>>
>> So what I can add is logic that first tries with IRQF_LOW|IRQF_SHARED,
>> and if that fails, we fall back to IRQF_FALLING and retry. WDYT?
>
> That sounds like a decent plan.
Okay, I'll add a patch to the series then and resend.
Thanks for your feedback!
Daniel
prev parent reply other threads:[~2020-05-19 17:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 14:37 [PATCH 0/4] sc16is7xx: Add IrDA mode and threaded IRQ Daniel Mack
2020-05-08 14:37 ` [PATCH 1/4] dt-bindings: sc16is7xx: Add flag to activate IrDA mode Daniel Mack
2020-05-18 18:08 ` Rob Herring
2020-05-18 18:41 ` Daniel Mack
2020-05-19 12:01 ` Maarten Brock
2020-05-08 14:37 ` [PATCH 2/4] " Daniel Mack
2020-05-08 14:37 ` [PATCH 3/4] sc16is7xx: Always use falling edge IRQ Daniel Mack
2020-05-09 12:41 ` Maarten Brock
2020-05-08 14:37 ` [PATCH 4/4] sc16is7xx: Use threaded IRQ Daniel Mack
2020-05-09 12:55 ` Maarten Brock
2020-05-17 20:44 ` Daniel Mack
2020-05-18 11:14 ` Maarten Brock
2020-05-18 16:57 ` Daniel Mack
2020-05-19 16:32 ` Maarten Brock
2020-05-19 17:37 ` Daniel Mack [this message]
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=c03101a9-ea8b-fdff-3f29-fd7c4f400019@zonque.org \
--to=daniel@zonque.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-serial-owner@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=m.brock@vanmierlo.com \
--cc=pascal.huerst@gmail.com \
--cc=robh+dt@kernel.org \
/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).