Module Name:    src
Committed By:   jmcneill
Date:           Thu Dec 12 12:47:57 UTC 2024

Modified Files:
        src/sys/dev/acpi: qcomgpio.c

Log Message:
qcomgpio: Translate virtual GPIO numbers using ACPI table data.

The scheme used by this device node appears to follow the following
conventions for mapping ACPI virtual pin numbers to hardware pin numbers:

1) If the virtual pin number is < the number of hardware pin numbers,
   it represents a hardware pin number.
2) If the virtual pin number is greater than this, divide it by 64. This
   gives us an index into the Interrupt resources returned by _CRS. The
   IRQ number in this resource can be used to lookup the hardware pin
   number in the _DSM PDC method call "CIPR".

As an added bonus, use the _DSM GPIO method call to return the number
of pins instead of hard-coding it for X1E.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/qcomgpio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to