input: Add input core
Currently all input driver register themselves as consoles. Consoles are
fine for typing text, but they do not allow to ask for the current
pressed state of buttons or keypads. They also do not support non
printable keys like the function keys.

This patch adds a simple input core. On the driver side it supports
input_report_key_event() to report events (button presses and releases).
On the consumer side it allows getting the current button status via
input_key_get_status(). Also an event driven interface is available
which calls a callback whenever an input event is received.
The input core also registers a console for all registered input
devices which handles passing events to the console and stuff like key
repetition, so this can be removed from the drivers once they are
converted to the input core.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent cfe4e61 commit 224a08df5d9eed4e75d436911ffaca6b0af5a689
@Sascha Hauer Sascha Hauer authored on 12 Jan 2016
Showing 4 changed files
View
drivers/input/Kconfig
View
drivers/input/Makefile
View
drivers/input/input.c 0 → 100644
View
include/input/input.h 0 → 100644