]> asedeno.scripts.mit.edu Git - linux.git/commit
gpio: adp5588.c: Switch to events system
authorNikolaus Voss <nv@vosn.de>
Tue, 5 Feb 2019 13:31:11 +0000 (14:31 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 9 Feb 2019 10:33:37 +0000 (11:33 +0100)
commit5d643edad73e839575f854c68782eecdfaf34c1e
treea863986d1acb798d1e72975d48144ed8065bef6c
parent9f22af1167815ce10909529412de33122be44758
gpio: adp5588.c: Switch to events system

Interupts were generated using GPIN interrupts of
ADP5588. These interrupts have two important limitations:
1. Interrupts can only be generated for either rising or
   falling edges but not both.
2. Interrupts are reasserted as long as the interrupt condition
   persists (i.e. high or low level on that GPIN). This generates
   lots of interrupts unless the event is very short.

To overcome this, ADP5588 provides an event system which queues
up to 10 events in a buffer. GPIN events are queued whenever the
GPIN is asserted or deasserted. This makes it possible to support
generating GPIN interrupts for both edges and to generate only one
interrupt per state change.
Thus it is possible to chain the gpio-keys driver for some GPIOs.

Signed-off-by: Nikolaus Voss <nikolaus.voss@loewensteinmedical.de>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-adp5588.c