]> git.baikalelectronics.ru Git - kernel.git/commit
Input: cyapa - fix for losing events during device power transitions
authorDudley Du <dudl@cypress.com>
Fri, 4 Mar 2016 19:23:09 +0000 (11:23 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 4 Mar 2016 19:32:13 +0000 (11:32 -0800)
commit75ea1bd63b2fe1bb1e25fa2364bb179cd4e4d2ee
tree295eebb05b77b62f3b64ee8112b83b4e11980198
parent0628a3a92d431b1faa225e337eac33573d709d82
Input: cyapa - fix for losing events during device power transitions

When changing the scan rate as part of runtime-resume process we may lose
some of the events, because:

1) for gen3 trackpads, the driver must msleep() some time to ensure that
the device is ready to accept next command;

2) for gen5 and later trackpads, the queue dumping function will simply
ignore the events when waiting for the set power mode command response.

The solution is to keep polling and report those valid events when the set
power mode command is in progress.

Signed-off-by: Dudley Du <dudl@cypress.com>
Tested-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/cyapa.c
drivers/input/mouse/cyapa.h
drivers/input/mouse/cyapa_gen3.c
drivers/input/mouse/cyapa_gen5.c
drivers/input/mouse/cyapa_gen6.c