From 37384c6b671e3f051d98914fd499b3e577b233ee Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 15 May 2020 11:43:36 -0600 Subject: [PATCH] Improve support for Intel HID event filter --- src/mainboard/system76/lemp9/acpi/ec.asl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/mainboard/system76/lemp9/acpi/ec.asl b/src/mainboard/system76/lemp9/acpi/ec.asl index 40f92bc926..af07c2cfeb 100644 --- a/src/mainboard/system76/lemp9/acpi/ec.asl +++ b/src/mainboard/system76/lemp9/acpi/ec.asl @@ -115,13 +115,21 @@ Device (EC0) Method (_Q11, 0, NotSerialized) // Brightness Down { Debug = "EC: Brightness Down" - ^^^^HIDD.HPEM (20) + if (^^^^HIDD.HRDY) { + ^^^^HIDD.HPEM (20) + } Else { + \_SB.PCI0.GFX0.DECB () + } } Method (_Q12, 0, NotSerialized) // Brightness Up { Debug = "EC: Brightness Up" - ^^^^HIDD.HPEM (19) + if (^^^^HIDD.HRDY) { + ^^^^HIDD.HPEM (19) + } Else { + \_SB.PCI0.GFX0.INCB () + } } Method (_Q13, 0, NotSerialized) // Camera Toggle @@ -132,10 +140,10 @@ Device (EC0) Method (_Q14, 0, NotSerialized) // Airplane Mode { Debug = "EC: Airplane Mode" - // Only send HIDD message when hardware airplane mode not in use - If (ECOS == 2) { + if (^^^^HIDD.HRDY) { ^^^^HIDD.HPEM (8) } + // TODO: hardware airplane mode } Method (_Q15, 0, NotSerialized) // Suspend Button