[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1490867450-31765-2-git-send-email-jeffy.chen@rock-chips.com>
Date: Thu, 30 Mar 2017 17:50:49 +0800
From: Jeffy Chen <jeffy.chen@...k-chips.com>
To: linux-kernel@...r.kernel.org
Cc: briannorris@...omium.org, dmitry.torokhov@...il.com,
dbasehore@...gle.com, dianders@...omium.org,
Jeffy Chen <jeffy.chen@...k-chips.com>,
Gwendal Grignou <gwendal@...omium.org>,
Vic Yang <victoryang@...gle.com>, linux-input@...r.kernel.org,
Enric Balletbo Serra <enric.balletbo@...labora.com>,
Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 1/2] input: cros_ec_keyb: Report wakeup events
Report wakeup events when process events.
Signed-off-by: Jeffy Chen <jeffy.chen@...k-chips.com>
---
drivers/input/keyboard/cros_ec_keyb.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 6a250d6..a93d55f 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -286,6 +286,9 @@ static int cros_ec_keyb_work(struct notifier_block *nb,
return NOTIFY_DONE;
}
+ if (device_may_wakeup(ckdev->dev))
+ pm_wakeup_event(ckdev->dev, 0);
+
return NOTIFY_OK;
}
@@ -632,6 +635,12 @@ static int cros_ec_keyb_probe(struct platform_device *pdev)
return err;
}
+ err = device_init_wakeup(dev, 1);
+ if (err) {
+ dev_err(dev, "cannot init wakeup: %d\n", err);
+ return err;
+ }
+
return 0;
}
--
2.1.4
Powered by blists - more mailing lists