linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: Enable / disable methods
@ 2009-12-03 10:58 Samu Onkalo
  2009-12-03 10:58 ` [PATCH] input: enable / disable methods with sysfs entry Samu Onkalo
  0 siblings, 1 reply; 7+ messages in thread
From: Samu Onkalo @ 2009-12-03 10:58 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: broonie, linux-input, Samu Onkalo

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(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-03 17:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-03 10:58 [PATCH] input: Enable / disable methods Samu Onkalo
2009-12-03 10:58 ` [PATCH] input: enable / disable methods with sysfs entry Samu Onkalo
2009-12-03 10:58   ` [PATCH] input: twl4030_keypad enable / disable feature Samu Onkalo
2009-12-03 11:08   ` [PATCH] input: enable / disable methods with sysfs entry Mark Brown
2009-12-03 11:42     ` Joonyoung Shim
2009-12-03 15:20       ` Ferenc Wagner
2009-12-03 17:22         ` Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).