Thread (5 messages) flat view 5 messages, 3 authors, 2018-02-11

Re: [PATCH] Input: gpio_keys: Add level trigger support for GPIO keys

From: Andy Shevchenko <hidden>
Date: 2018-02-09 15:03:54
Also in: linux-input, lkml

On Fri, Feb 9, 2018 at 11:23 AM, Baolin Wang [off-list ref] wrote:
On 9 February 2018 at 14:39, Dmitry Torokhov [off-list ref] wrote:
quoted
On Thu, Feb 8, 2018 at 10:08 PM, Baolin Wang [off-list ref] wrote:
quoted
On some platforms (such as Spreadtrum platform), the GPIO keys can only
be triggered by level type.
How do you stop the interrupt from re-triggering as long as the key
stays pressed?
We will set the level type irq handler as handle_level_irq(), in this
function, it will mask and ack the irq firstly.
Wouldn't be ambiguous?

1. User presses the key ->
  a) we got edge followed by level signaling;
  b) IRQ core masks line, calls handler, ACKs, unmasks;
  c) somewhere here Press Event is sent;
  d) we still have level... We get IRQ fired again? But see 1. It
obviously not the case.
2. User releases the key ->
  ...

So, the main question if I understood Dmitry correctly is the period
in time where IRQ line should be masked on one hand, and on the other
it will guarantee that user didn't release-press cylcle.

-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help