[PATCH] input: Enable / disable methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



First patch adds a generic way for userspace to enable and
disable an input device. Userspace interface is a sysfs entry.
Device is enabled by writing '1' to enable entry and disabled by
writing '0' to enabled entry. Current state can be read from the entry.
Actual disabling happens via callback functions. If the device driver doesn't
provide callback functions, write to sysfs entry returns an error code ENOSYS.

Purpose is to provide a generic way to force some input device to disabled
or enabled state regardless of the number of the users of that input device.
When disabling of the device happens in the driver level, it is possible
to turn off the corresponfing HW block to prevent unwanted activity.
For example system wide keypad locking feature can utilize this feature.
When several user space programs keep the input device open, one
user space program can set input device to disabled state. 

Second patch utilizes new feature and adds HW level disable / enable feature
to twl4030_keypad driver. Regardless of the number of users one control
program can temporarily disable all keypad interrupts from the twl4030 keypad
block. Keypad HW is also disabled during suspend mode.

Samu Onkalo (2):
  input: enable / disable methods with sysfs entry
  input: twl4030_keypad enable / disable feature

 drivers/input/input.c                   |   45 +++++++++
 drivers/input/keyboard/twl4030_keypad.c |  153 ++++++++++++++++++++++++++-----
 include/linux/input.h                   |    8 ++
 3 files changed, 183 insertions(+), 23 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux