[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180601180053.120202-1-ravisadineni@chromium.org>
Date: Fri, 1 Jun 2018 11:00:53 -0700
From: Ravi Chandra Sadineni <ravisadineni@...omium.org>
To: dmitry.torokhov@...il.com, chenhong3@...wei.com,
ravisadineni@...omium.org, ravisadineni@...gle.com, dtor@...gle.com
Cc: tbroch@...gle.com, linux-kernel@...r.kernel.org,
linux-input@...r.kernel.org, rajatja@...gle.com, bleung@...gle.com
Subject: [PATCH] i8042: Increment wakeup_count for the respective port.
Call pm_wakeup_event on every irq. This should help us in identifying if
i8042 port was a potential wake reason for the last resume.
Signed-off-by: Ravi Chandra Sadineni <ravisadineni@...omium.org>
---
drivers/input/serio/i8042.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 824f4c1c1f310..96e27766d553d 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -573,6 +573,9 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id)
port = &i8042_ports[port_no];
serio = port->exists ? port->serio : NULL;
+ if (serio && device_may_wakeup(&serio->dev))
+ pm_wakeup_event(&serio->dev, 0);
+
filter_dbg(port->driver_bound, data, "<- i8042 (interrupt, %d, %d%s%s)\n",
port_no, irq,
dfl & SERIO_PARITY ? ", bad parity" : "",
--
2.17.0.921.gf22659ad46-goog
Powered by blists - more mailing lists