summaryrefslogtreecommitdiffstats
path: root/drivers/input/input.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-12-12 06:57:31 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-12-12 08:48:49 +0100
commitdf2d4637b0813e47ad12af3eacf6b5292c0fb164 (patch)
tree71401042b4fcc10bc72153f86a540ca20c19241b /drivers/input/input.c
parentInput: sa1111ps2 - annotate probe() and remove() methods (diff)
downloadlinux-df2d4637b0813e47ad12af3eacf6b5292c0fb164.tar.xz
linux-df2d4637b0813e47ad12af3eacf6b5292c0fb164.zip
Input: document use of input_event() function
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 5c16001959cc..ab060710688f 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -296,9 +296,15 @@ static void input_handle_event(struct input_dev *dev,
* @value: value of the event
*
* This function should be used by drivers implementing various input
- * devices. See also input_inject_event().
+ * devices to report input events. See also input_inject_event().
+ *
+ * NOTE: input_event() may be safely used right after input device was
+ * allocated with input_allocate_device(), even before it is registered
+ * with input_register_device(), but the event will not reach any of the
+ * input handlers. Such early invocation of input_event() may be used
+ * to 'seed' initial state of a switch or initial position of absolute
+ * axis, etc.
*/
-
void input_event(struct input_dev *dev,
unsigned int type, unsigned int code, int value)
{