diff options
author | Mika Westerberg <ext-mika.1.westerberg@nokia.com> | 2010-02-04 00:48:00 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-02-04 00:50:44 -0800 |
commit | 9e3af04f8787315f63f55b191bb9a06741dbf183 (patch) | |
tree | c08a9f88077ece1a232ce67ade8a22536d5464df /include/linux/gpio_keys.h | |
parent | 3d7bbd4575cfb23e6ef7368fff1f7d7e198b7930 (diff) |
Input: gpio-keys - add support for disabling gpios through sysfs
Now gpio-keys input driver exports 4 new attributes to userland through
sysfs:
/sys/devices/platform/gpio-keys/keys [ro]
/sys/devices/platform/gpio-keys/switches [ro]
/sys/devices/platform/gpio-keys/disabled_keys [rw]
/sys/devices/platform/gpio-keys/disables_switches [rw]
With these attributes, userland program can read which keys and
switches can be disabled and then disable/enable them as needed.
Keys and switches are exported as stringified bitmap of codes
(keycodes or switch codes). For example keys 15, 89, 100, 101,
102 are exported as: '15,89,100-102'.
Description of the attributes:
keys - bitmap of keys which can be disabled
switches - bitmap of switches which can be disabled
disabled_keys - bitmap of currently disabled keys
(bit 1 means disabled, 0 enabled)
disabled_switches - bitmap of currently disabled switches
(bit 1 means disabled, 0 enabled)
Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/gpio_keys.h')
-rw-r--r-- | include/linux/gpio_keys.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h index 1289fa7623ca..cd0b3f30f48e 100644 --- a/include/linux/gpio_keys.h +++ b/include/linux/gpio_keys.h @@ -10,6 +10,7 @@ struct gpio_keys_button { int type; /* input event type (EV_KEY, EV_SW) */ int wakeup; /* configure the button as a wake-up source */ int debounce_interval; /* debounce ticks interval in msecs */ + bool can_disable; }; struct gpio_keys_platform_data { |