diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/google/wilco/acpi/ec.asl | 9 | ||||
-rw-r--r-- | src/ec/google/wilco/acpi/event.asl | 10 |
2 files changed, 17 insertions, 2 deletions
diff --git a/src/ec/google/wilco/acpi/ec.asl b/src/ec/google/wilco/acpi/ec.asl index 1bb28be063..7531dbf8a5 100644 --- a/src/ec/google/wilco/acpi/ec.asl +++ b/src/ec/google/wilco/acpi/ec.asl @@ -7,6 +7,8 @@ Device (EC0) Name (_GPE, EC_SCI_GPI) Name (_STA, 0xf) Name (DBUG, Zero) + Name (ISSX, Zero) /* Is the EC in S0ix mode? */ + Name (UCEP, Zero) /* Is there a pending UCSI event? */ Name (_CRS, ResourceTemplate() { IO (Decode16, @@ -140,6 +142,8 @@ Device (EC0) */ Method (S0IX, 1, Serialized) { + ^ISSX = Arg0 /* Update S0ix state. */ + If (Arg0) { Printf ("EC Enter S0ix") W (CSEX, One) @@ -152,6 +156,11 @@ Device (EC0) } Else { Printf ("EC Exit S0ix") W (CSEX, Zero) + + /* If UCSI event happened during S0ix send it now. */ + If (^UCEP == One) { + ^_Q79 () + } } } diff --git a/src/ec/google/wilco/acpi/event.asl b/src/ec/google/wilco/acpi/event.asl index bf4bb19be7..4e24ee32de 100644 --- a/src/ec/google/wilco/acpi/event.asl +++ b/src/ec/google/wilco/acpi/event.asl @@ -139,6 +139,12 @@ Method (_Q66, 0, Serialized) /* UCSI SCI uses a unique event code */ Method (_Q79, 0, Serialized) { - Printf ("EC _Q79 UCSI Event") - Notify (^UCSI, 0x80) + If (ISSX == Zero) { + Printf ("EC _Q79 UCSI Event") + Notify (^UCSI, 0x80) + ^UCEP = Zero + } Else { + Printf ("EC _Q79 UCSI Event Masked in S0ix") + ^UCEP = One + } } |