mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
Prevent input subsystem from resetting key state during resume when wake enabled
Change-Id: I21908b932df5d9a1dc965221d849644101b7a259 Signed-off-by: paris_yeh <paris_yeh@asus.com>
This commit is contained in:
parent
fdf1b1cd3a
commit
71db33d591
2 changed files with 11 additions and 1 deletions
|
@ -1602,7 +1602,10 @@ static int input_dev_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct input_dev *input_dev = to_input_dev(dev);
|
struct input_dev *input_dev = to_input_dev(dev);
|
||||||
|
|
||||||
input_reset_device(input_dev);
|
/* If device is configured to wake device do not reset keys. */
|
||||||
|
if (!device_can_wakeup(dev)) {
|
||||||
|
input_reset_device(input_dev);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -732,6 +732,13 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
|
||||||
goto fail2;
|
goto fail2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If any single key button can wake the device, we need to inform
|
||||||
|
the input subsystem not to mess with our key state during a suspend
|
||||||
|
and resume cycle. */
|
||||||
|
if (wakeup) {
|
||||||
|
device_set_wakeup_capable(&input->dev, true);
|
||||||
|
}
|
||||||
|
|
||||||
error = input_register_device(input);
|
error = input_register_device(input);
|
||||||
if (error) {
|
if (error) {
|
||||||
dev_err(dev, "Unable to register input device, error: %d\n",
|
dev_err(dev, "Unable to register input device, error: %d\n",
|
||||||
|
|
Loading…
Reference in a new issue