Userspace is allowed to coalesce events between SYNCs. And since the code emits UP right after DOWN for the same key, it may be missed (up+down=nothing). Add an extra sync in between UP and DOWN events to disable the coalesce. Signed-off-by: Jiri Slaby <jslaby@xxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxx> Cc: devel@xxxxxxxxxxxxxxxxxxxx Cc: Phil Hannent <phil@xxxxxxxxxxxxx> Cc: <mwilder@xxxxxxxxxxx> Cc: Dmitry Torokhov <dtor@xxxxxxx> --- drivers/staging/mimio/mimio.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/staging/mimio/mimio.c b/drivers/staging/mimio/mimio.c index 2cfef4a..08a5400 100644 --- a/drivers/staging/mimio/mimio.c +++ b/drivers/staging/mimio/mimio.c @@ -730,6 +730,7 @@ static void mimio_rx_handler(struct mimio *mimio, dev_dbg(dev, "mem-reset.\n"); /* input_regs(mimio->idev, regs); */ input_event(mimio->idev, EV_KEY, BTN_0, 1); + input_sync(mimio->idev); input_event(mimio->idev, EV_KEY, BTN_0, 0); input_sync(mimio->idev); mimio->pktbuf.p += 7; @@ -750,6 +751,7 @@ static void mimio_rx_handler(struct mimio *mimio, dev_dbg(&mimio->idev->dev, "new-page.\n"); /* input_regs(mimio->idev, regs); */ input_event(mimio->idev, EV_KEY, BTN_1, 1); + input_sync(mimio->idev); input_event(mimio->idev, EV_KEY, BTN_1, 0); input_sync(mimio->idev); break; @@ -757,6 +759,7 @@ static void mimio_rx_handler(struct mimio *mimio, dev_dbg(&mimio->idev->dev, "tag-page.\n"); /* input_regs(mimio->idev, regs); */ input_event(mimio->idev, EV_KEY, BTN_2, 1); + input_sync(mimio->idev); input_event(mimio->idev, EV_KEY, BTN_2, 0); input_sync(mimio->idev); break; @@ -764,6 +767,7 @@ static void mimio_rx_handler(struct mimio *mimio, dev_dbg(&mimio->idev->dev, "print-page.\n"); /* input_regs(mimio->idev, regs);*/ input_event(mimio->idev, EV_KEY, BTN_3, 1); + input_sync(mimio->idev); input_event(mimio->idev, EV_KEY, BTN_3, 0); input_sync(mimio->idev); break; @@ -772,6 +776,7 @@ static void mimio_rx_handler(struct mimio *mimio, "maximize-window.\n"); /* input_regs(mimio->idev, regs); */ input_event(mimio->idev, EV_KEY, BTN_4, 1); + input_sync(mimio->idev); input_event(mimio->idev, EV_KEY, BTN_4, 0); input_sync(mimio->idev); break; @@ -779,6 +784,7 @@ static void mimio_rx_handler(struct mimio *mimio, dev_dbg(&mimio->idev->dev, "find-ctl-panel.\n"); /* input_regs(mimio->idev, regs); */ input_event(mimio->idev, EV_KEY, BTN_5, 1); + input_sync(mimio->idev); input_event(mimio->idev, EV_KEY, BTN_5, 0); input_sync(mimio->idev); break; -- 1.6.6.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel