[coreboot-gerrit] Change in coreboot[master]: chromeec: Notify CREC device of wakeup events

Furquan Shaikh (Code Review) gerrit at coreboot.org
Tue Nov 28 23:40:57 CET 2017


Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/22625


Change subject: chromeec: Notify CREC device of wakeup events
......................................................................

chromeec: Notify CREC device of wakeup events

Whenever there is a new EC event that could be wake-capable, notify
CREC device of this using notification value 0x2 i.e. device
wake. This allows Linux kernel to track active_count value correctly
for CREC device.

BUG=b:69118395
BRANCH=None
TEST=Verified on Soraka:
1. Put device into suspend
2. Wakeup using mode change/lid open
3. Check that the active_count for GOOG0004 has increased
(cat wakeup_sources | grep GOOG0004)

Change-Id: I723f7f4e4c99e7a5b57c6296da66cf30cd413c27
Signed-off-by: Furquan Shaikh <furquan at chromium.org>
---
M src/ec/google/chromeec/acpi/ec.asl
1 file changed, 5 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/22625/1

diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index 0d05110..d295a8d 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -212,6 +212,7 @@
 	{
 		Store ("EC: LID OPEN", Debug)
 		Store (LIDS, \LIDS)
+		Notify (CREC, 0x2)
 #ifdef EC_ENABLE_LID_SWITCH
 		Notify (LID0, 0x80)
 #endif
@@ -297,6 +298,7 @@
 	Method (_Q0D, 0, NotSerialized)
 	{
 		Store ("EC: KEY PRESSED", Debug)
+		Notify (CREC, 0x2)
 	}
 
 	// Thermal Shutdown Imminent
@@ -354,17 +356,18 @@
 		Notify (CREC, 0x80)
 	}
 
-#ifdef EC_ENABLE_TABLET_EVENT
 	// TABLET mode switch Event
 	Method (_Q1D, 0, NotSerialized)
 	{
 		Store ("EC: TABLET mode switch Event", Debug)
+		Notify (CREC, 0x2)
+#ifdef EC_ENABLE_TABLET_EVENT
 		If (CondRefOf (\_SB.DPTF.TPET)) {
 			\_SB.DPTF.TPET()
 		}
 		Notify (TBMC, 0x80)
-	}
 #endif
+	}
 
 	/*
 	 * Dynamic Platform Thermal Framework support

-- 
To view, visit https://review.coreboot.org/22625
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I723f7f4e4c99e7a5b57c6296da66cf30cd413c27
Gerrit-Change-Number: 22625
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171128/0a71fb2c/attachment.html>


More information about the coreboot-gerrit mailing list