Skip to contentSkip to conversation

platform/chrome: cros_ec_lpc: wake up from s2idle on Chrome EC

PATCH In review Wenkai Du 2 participants 2 messages Feb 22, 2018 – Mar 20, 2018

Subsystems (2)
lore
Share & tools
lore

Wenkai Du

author
#0 lore raw

PATCH 1/1 platform/chrome: cros_ec_lpc: wake up from s2idle on Chrome EC

Chrome platform installed a Chrome EC notify handler which prevents default EC GPE handler getting called. Add pm_system_wakeup to the Chrome EC notify handler so wake up from s2idle can happen.

---
 drivers/platform/chrome/cros_ec_lpc.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/platform/chrome/cros_ec_lpc.c +4 -0
index af89e82eecd2..2a40c2b1a7ff 100644
@@ -31,6 +31,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/printk.h>
+#include <linux/suspend.h>
 
 #define DRV_NAME "cros_ec_lpcs"
 #define ACPI_DRV_NAME "GOOG0004"
@@ -235,6 +236,9 @@ static void cros_ec_lpc_acpi_notify(acpi_handle device, u32 value, void *data)
 	    cros_ec_get_next_event(ec_dev, NULL) > 0)
 		blocking_notifier_call_chain(&ec_dev->event_notifier, 0,
 					     ec_dev);
+
+	if (value == ACPI_NOTIFY_DEVICE_WAKE)
+		pm_system_wakeup();
 }
 
 static int cros_ec_lpc_probe(struct platform_device *pdev)
Signature · 1 line
2.16.1
#1 lore raw

Hi Wenkai,

Thanks for providing the patch.

Quoted 6 lines · Wenkai Du

Chrome platform installed a Chrome EC notify handler which prevents default EC GPE handler getting called. Add pm_system_wakeup to the Chrome EC notify handler so wake up from s2idle can happen.

LGTM. Applied to my for v4.17 branch.

Thank you!
Benson

Signature · 7 lines
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]