From aaca981e4588906aece15392f26cc861b6f455ac Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Tue, 26 Mar 2019 14:27:42 -0700 Subject: Input: i8042 - signal wakeup from atkbd/psmouse Instead of signalling wakeup directly from i8042, let psmouse and atkbd drivers execute basic protocol handling and only then signal wakeup condition. This solves the issue where we increment wakeup counter simply because we are getting responses from keyboard/mouse to the commands we ourselves send to them as part of suspend transition. Acked-by: Rafael J. Wysocki Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/psmouse-base.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/input/mouse') diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index d3ff1fc09af7..94f7ca5ad077 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -373,6 +373,8 @@ static irqreturn_t psmouse_interrupt(struct serio *serio, if (ps2_handle_response(&psmouse->ps2dev, data)) goto out; + pm_wakeup_event(&serio->dev, 0); + if (psmouse->state <= PSMOUSE_RESYNCING) goto out; -- cgit v1.2.3