]> git.baikalelectronics.ru Git - kernel.git/commit
Input: gpio_keys_polled - add support for abs/rel axis
authorHans de Goede <hdegoede@redhat.com>
Wed, 14 Oct 2015 23:44:35 +0000 (16:44 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 15 Oct 2015 00:15:04 +0000 (17:15 -0700)
commit674067105da0765d8b2c72727d62a6163df7b19e
treea5345bdaa6b06c655ff03d4118bd2538622a6bc0
parent4ca36794e5e63510e40f800a0a1d3ec5133ea95e
Input: gpio_keys_polled - add support for abs/rel axis

This changAdd support for EV_ABS / EV_REL events to the gpio-keys-polled driver.

The driver already allows specifying what type of events (key / rel / abs)
a button generates when pressed, but for rel / abs axis we also need to
specify which value this specific gpio represents.

One use case is digital joysticks / direction-pads which are hooked up to
gpio, in this case we've left and right buttons which we want to map to
EV_ABS, ABS_X and we want generate events for left with a value of -1 and
for right with a value of +1 (and similar for up / down and ABS_Y).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Documentation/devicetree/bindings/input/gpio-keys-polled.txt
drivers/input/keyboard/gpio_keys_polled.c