summaryrefslogtreecommitdiff
path: root/Documentation/input
diff options
context:
space:
mode:
authorVojtech Pavlik <vojtech@twilight.ucw.cz>2002-07-25 17:56:28 +0200
committerVojtech Pavlik <vojtech@twilight.ucw.cz>2002-07-25 17:56:28 +0200
commit2f39a6688e2e8d4f5fc12487a900b7cd2fc603b4 (patch)
treee253ae74e8f5d4207ad6157236d3659e81e94a6b /Documentation/input
parent252efaf31b375a8b8870ffeee51b2fd1a7dd5d89 (diff)
By popular request, and explicit method of telling which events
from a device belong together was implemented - input_sync() and EV_SYN. Touches every input driver. The first to make use of it is mousedev.c to properly merge events into PS/2 packets.
Diffstat (limited to 'Documentation/input')
-rw-r--r--Documentation/input/input-programming.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/input/input-programming.txt b/Documentation/input/input-programming.txt
index e5ca6c2cecb5..e96152567ea2 100644
--- a/Documentation/input/input-programming.txt
+++ b/Documentation/input/input-programming.txt
@@ -23,6 +23,7 @@ pressed or released a BUTTON_IRQ happens. The driver could look like:
static void button_interrupt(int irq, void *dummy, struct pt_regs *fp)
{
input_report_key(&button_dev, BTN_1, inb(BUTTON_PORT) & 1);
+ input_sync(&button_dev);
}
static int __init button_init(void)
@@ -86,13 +87,22 @@ While in use, the only used function of the driver is
which upon every interrupt from the button checks its state and reports it
via the
- input_report_btn()
+ input_report_key()
call to the input system. There is no need to check whether the interrupt
routine isn't reporting two same value events (press, press for example) to
the input system, because the input_report_* functions check that
themselves.
+Then there is the
+
+ input_sync()
+
+call to tell those who receive the events that we've sent a complete report.
+This doesn't seem important in the one button case, but is quite important
+for for example mouse movement, where you don't want the X and Y values
+to be interpreted separately, because that'd result in a different movement.
+
1.2 dev->open() and dev->close()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~