From: Chanwoo Choi <cw00.choi@samsung.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH] extcon: gpio: Request reasonable interrupts
Date: Mon, 24 Jun 2019 09:10:58 +0900 [thread overview]
Message-ID: <547eacd4-e4b9-e9a9-9f89-aa33b05cb674@samsung.com> (raw)
In-Reply-To: <CACRpkdaCaZyzfr9=QRz6uRZpK6mw_zDeVmBwgH7=FPbNGKB9tQ@mail.gmail.com>
On 19. 6. 8. 오전 6:24, Linus Walleij wrote:
> On Tue, Jun 4, 2019 at 3:30 AM Chanwoo Choi <cw00.choi@samsung.com> wrote:
>> On 19. 5. 31. 오전 3:39, Linus Walleij wrote:
>
>>> + /*
>>> + * It is unlikely that this is an acknowledged interrupt that goes
>>> + * away after handling, what we are looking for are falling edges
>>> + * if the signal is active low, and rising edges if the signal is
>>> + * active high.
>>> + */
>>> + if (gpiod_is_active_low(data->gpiod))
>>> + irq_flags = IRQF_TRIGGER_FALLING;
>>
>> If gpiod_is_active_low(data->gpiod) is true, irq_flags might be
>> IRQF_TRIGGER_LOW instead of IRQF_TRIGGER_FALLING. How can we sure
>> that irq_flags is always IRQF_TRIGGER_FALLING?
>
> OK correct me if I'm wrong, but this is an external connector and
> the GPIO goes low/high when the connector is physically inserted.
> If it was level trigged, it would lock up the CPU with interrupts until
> it was unplugged again, since there is no way to acknowledge a
> level IRQ.
>
> I think level IRQ on GPIOs are only used for logic peripherals
> such as ethernet controllers etc where you can talk to the peripheral
> and get it to deassert the line and thus acknowledge the IRQ.
>
> So the way I see it only edge triggering makes sense for extcon.
>
> Correct me if I'm wrong.
Sorry for late reply because of vacation.
Actually, I have not thought that the kind of irq_flags are fixed
according to the category of specific h/w device. Until now, as I knew,
the h/w device have to initialize the the kind of irq_flags
for each peripheral device dependency. The each vendor of peripheral device
might design the kind of the kind of irq-flags for detection.
If possible, could you provide some example on mainline kernel?
--
Best Regards,
Chanwoo Choi
Samsung Electronics
next prev parent reply other threads:[~2019-06-24 2:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190530183941epcas5p4688d5fa80df649e4184a296ea78e6256@epcas5p4.samsung.com>
2019-05-30 18:39 ` Linus Walleij
2019-06-04 1:31 ` Chanwoo Choi
2019-06-07 21:24 ` Linus Walleij
2019-06-24 0:10 ` Chanwoo Choi [this message]
2019-06-24 22:24 ` Linus Walleij
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=547eacd4-e4b9-e9a9-9f89-aa33b05cb674@samsung.com \
--to=cw00.choi@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.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
all inboxes | Powered by JetHome®