Re: [PATCH] ACPI: GED: Support GpioInt event resources
From: Rahul Pon
Date: Thu Oct 01 2026 - 00:29:09 EST
Hi Mika,
On Thu, Oct 01, 2026 at 06:04:20AM +0200, Mika Westerberg wrote:
> ACPI GED specifically is supposed to use interrupts only (hence the name,
> Interrupt -signaled ACPI events). I think this one should really use the
> GPIO signaled ACPI events instead and probably just has the ACPI0013 there
> by accident. Can you share the ASL around this device?
Sure, below. iasl shows the _CRS buffers as raw bytes; the GpioInt
lines are decoded from them and recompile to the same bytes.
The lid device:
Device (LIGE)
{
Name (_HID, "ACPI0013")
Name (_UID, One)
Name (_DEP, Package (0x03)
{
\_SB.GIO0, ,
\_SB.LID0, ,
\_SB.IC10,
})
Name (EEDP, Buffer (0x03)
{
0xFF
})
CreateByteField (EEDP, Zero, STAT)
CreateField (EEDP, 0x10, 0x08, DBUF)
Name (LIDG, Zero)
Method (_CRS, 0, NotSerialized)
{
Name (RBUF, Buffer (0x25)
{
/* 0000 */ 0x8C, 0x20, 0x00, 0x01, 0x00, 0x01, 0x00, 0x1D,
/* 0008 */ 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00,
/* 0010 */ 0x00, 0x19, 0x00, 0x23, 0x00, 0x00, 0x00, 0xC0,
/* 0018 */ 0x03, 0x5C, 0x5F, 0x53, 0x42, 0x2E, 0x47, 0x49,
/* 0020 */ 0x4F, 0x30, 0x00, 0x79, 0x00
})
/* RBUF decodes to:
* GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 0x0000,
* "\\_SB.GIO0", 0x00, ResourceConsumer, ,) { 960 }
*/
Return (RBUF)
}
Method (_EVT, 1, NotSerialized)
{
If ((\_SB.IC10.AVBL == One))
{
Sleep (0x05)
Acquire (\_SB.ECMX, 0xFFFF)
EEDP = \_SB.IC10.CMB2
Release (\_SB.ECMX)
LIDG = DBUF
If ((LIDG & 0x04))
{
\_SB.LID0.LIDB = One
\_SB.GPU0.LIDB = One
Notify (\_SB.LID0, 0x80)
}
Else
{
\_SB.LID0.LIDB = \_SB.GIO0.LIDR
\_SB.GPU0.LIDB = \_SB.GIO0.LIDR
Notify (\_SB.LID0, 0x80)
If ((\_SB.LID0.LIDB == Zero))
{
\_SB.WMID.GWMT (0x08, One)
}
If ((\_SB.LID0.LIDB == One))
{
\_SB.WMID.GWMT (0x08, 0x02)
}
}
}
Else
{
\_SB.LID0.LIDB = \_SB.GIO0.LIDR
\_SB.GPU0.LIDB = \_SB.GIO0.LIDR
Notify (\_SB.LID0, 0x80)
}
}
}
The EC event device, ECGE, is another ACPI0013 with one GpioInt:
GpioInt (Edge, ActiveLow, Exclusive, PullUp, 0x0000,
"\\_SB.GIO0", 0x00, ResourceConsumer, ,) { 768 }
The GPIO controller (GIO0, QCOM0F0C) does have GPIO-signaled events.
Its _AEI lists one pin:
GpioInt (Edge, ActiveHigh, Exclusive, PullNone, 0x01F4,
"\\_SB.GIO0", 0x00, ResourceConsumer, ,) { 126 }
Its _EVT handles that pin (0x7E, a Notify to the GPU) and also pin 0x5C
with the same EC read and lid Notify as LIGE's _EVT, but _AEI does not
list 0x5C. So on this firmware the lid is signaled only through LIGE.
Either way, please drop this patch, and disregard the v2 plan in my
other reply. Looking at it again, it has no upstream user: GIO0 has no
ACPI driver in mainline, and my lid test used an out-of-tree bring-up
driver for it. Mainline supports these laptops through the device tree,
where the lid is a gpio-keys switch and no GED is involved.
Sorry for the noise.
Thanks,
Rahul