summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/cyapa_gen6.c
diff options
context:
space:
mode:
authorDudley Du <dudl@cypress.com>2016-03-04 11:23:09 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-03-04 11:32:13 -0800
commit3cd47869431d7402d0613cf0f7fbb392f2b97565 (patch)
tree295eebb05b77b62f3b64ee8112b83b4e11980198 /drivers/input/mouse/cyapa_gen6.c
parent5186b8c41a89fd071f8d036b41ec4b68fbcf2e4d (diff)
downloadblackbird-op-linux-3cd47869431d7402d0613cf0f7fbb392f2b97565.tar.gz
blackbird-op-linux-3cd47869431d7402d0613cf0f7fbb392f2b97565.zip
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>
Diffstat (limited to 'drivers/input/mouse/cyapa_gen6.c')
-rw-r--r--drivers/input/mouse/cyapa_gen6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/mouse/cyapa_gen6.c b/drivers/input/mouse/cyapa_gen6.c
index e4eb048d1bf6..016397850b1b 100644
--- a/drivers/input/mouse/cyapa_gen6.c
+++ b/drivers/input/mouse/cyapa_gen6.c
@@ -425,7 +425,7 @@ static int cyapa_gen6_deep_sleep(struct cyapa *cyapa, u8 state)
}
static int cyapa_gen6_set_power_mode(struct cyapa *cyapa,
- u8 power_mode, u16 sleep_time, bool is_suspend)
+ u8 power_mode, u16 sleep_time, enum cyapa_pm_stage pm_stage)
{
struct device *dev = &cyapa->client->dev;
struct gen6_interval_setting *interval_setting =
@@ -689,7 +689,7 @@ static int cyapa_gen6_operational_check(struct cyapa *cyapa)
* the device state is required.
*/
error = cyapa_gen6_set_power_mode(cyapa,
- PWR_MODE_FULL_ACTIVE, 0, false);
+ PWR_MODE_FULL_ACTIVE, 0, CYAPA_PM_ACTIVE);
if (error)
dev_warn(dev, "%s: failed to set power active mode.\n",
__func__);
OpenPOWER on IntegriCloud