]> git.baikalelectronics.ru Git - kernel.git/commit
Input: axp20x-pek - fix reporting button state as inverted
authorHans de Goede <hdegoede@redhat.com>
Wed, 24 Jun 2015 21:25:54 +0000 (14:25 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 24 Jun 2015 21:55:53 +0000 (14:55 -0700)
commit75200a05343f888e09878a650e97178e6f2f902d
tree4a842eec593de3d68a0a31f4dc3ab57d2ad3e893
parenta16b956a3865b1145e4e6bfb4e3f57ffef783707
Input: axp20x-pek - fix reporting button state as inverted

Currently we are reporting the button state as inverted on all boards with
an axp209 pmic, tested on a ba10-tvbox, bananapi, bananapro, cubietruck and
utoo-p66 tablet.

The axp209 datasheet clearly states that the power button must be connected
between the PWRON key and ground. Which means that on a press we will get
a falling edge (dbf) irq not a rising one, and likewise on release we will
get a rising edge (dbr) irq, not a falling one.

This commit swaps the check for the 2 irqs fixing the inverted reporting of
the power button state.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Carlo Caione <carlo@caione.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/axp20x-pek.c