Input: elan_i2c - increment wakeup count if wake source
authorRavi Chandra Sadineni <ravisadineni@chromium.org>
Wed, 15 May 2019 23:14:04 +0000 (16:14 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 15 May 2019 23:25:12 +0000 (16:25 -0700)
Notify the PM core that this device is the wake source. This helps
userspace daemon tracking the wake sources to identify the origin of the
wake.

Signed-off-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/elan_i2c_core.c

index f9525d6..2c0561e 100644 (file)
@@ -981,6 +981,8 @@ static irqreturn_t elan_isr(int irq, void *dev_id)
        if (error)
                goto out;
 
+       pm_wakeup_event(dev, 0);
+
        switch (report[ETP_REPORT_ID_OFFSET]) {
        case ETP_REPORT_ID:
                elan_report_absolute(data, report);