acpi_dev_gp..._wake_get_by(9)
π acpi_dev_gpio_irq_wake_get_by β like, the whole glow-up β¨
okay so bestie, welcome to the Kernel API Manual entry for acpi_dev_gpio_irq_wake_get_by (yes that's the real name, the header up top just cuts it off all dramatically like acpi_dev_gp..._wake_get_by because even manpage titles have a character limit π). this one is genuinely so useful, stay with me π«Ά
πΈ NAME πΈ
acpi_dev_gpio_irq_wake_get_by β find a GpioInt and translate it into a Linux IRQ number. that's the whole vibe. it's giving "matchmaker but for GPIO resources and IRQs" π
β¨ SYNOPSIS β¨
int acpi_dev_gpio_irq_wake_get_by (struct acpi_device *adev , const char
*con_id , int index , bool *wake_capable );
like, look at her. four parameters. main character energy π
π ARGUMENTS π
adevβ pointer to an ACPI device to get the IRQ from. this is your starting point, the address of the device you're interrogating πcon_idβ optional name of theGpioIntresource. optional!! she's flexible πindexβ index of theGpioIntresource, and bestie it counts starting from 0, so don't come at it with 1-based brain π§ β¨wake_capableβ gets set totrueif the IRQ is wake capable. it's an output parameter, so you're passing in abool *and the function fills it in for you π
π¦ DESCRIPTION π¦
so here's the tea: if the device has one or more GpioInt resources, this function is literally the translator you need to go from the GPIO offset in the resource all the way to the Linux IRQ number. no cap, that's her whole job π
she's idempotent β which is such a slay β but heads up: every single time it runs, it will configure the GPIO pin direction according to the flags in the GpioInt resource. so like, it doesn't change the outcome, but it does do a little something each time it runs ππ₯
she also takes that optional con_id parameter. if the resource has a con_id in a property, then only those will be taken into account. so it's a filter, basically, and it's a strict one π―
and the GPIO is considered wake capable if the GpioInt resource specifies SharedAndWake or ExclusiveAndWake. those are the two magic words. remember them πβ
π RETURN π
- Linux IRQ number (
> 0) on success π - negative
errnoon failure π
like literally, positive number = we ate, negative = we did not eat π
π₯ SEE ALSO π₯
- Kernel file
./drivers/gpio/gpiolib-acpi-core.c struct acpi_gpio_event(9)struct acpi_gpio_info(9)acpi_get_gpiod(9)acpi_gpio_get_io_resource(9)acpi_gpiochip_request_interrupts(9)acpi_gpiochip_free_interrupts(9)acpi_get_gpiod_by_index(9)acpi_get_gpiod_from_data(9)acpi_gpio_count(9)
the whole friend group, honestly. go say hi to all of them π«Άπ§
β οΈ real talk reminder: this page lives under ./drivers/gpio, dated October 2026, from the Kernel API Manual. that's the source, the version vibe, and the date β noted and archived, periodt π
β¨
stay hydrated, read your errno values, and ily for making it to the end πππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms