acpi_dev_gp..._wake_get_by(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the GpioInt resource. optional!! she's flexible πŸ’…
  • index β€” index of the GpioInt resource, and bestie it counts starting from 0, so don't come at it with 1-based brain 🧠✨
  • wake_capable β€” gets set to true if the IRQ is wake capable. it's an output parameter, so you're passing in a bool * 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 errno on failure 😭

like literally, positive number = we ate, negative = we did not eat πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

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