STRUCT ACPI_GPIO_EVENT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct acpi_gpio_event(9)

okay so bestie, welcome to the Kernel API Manual ✨ β€” this one's all about struct acpi_gpio_event, and honestly it's giving "little struct that holds the whole vibe of an ACPI GPIO event handler" πŸŽ€


🌸 NAME 🌸

struct acpi_gpio_event β€” the data that lives behind an ACPI GPIO event handler, no cap 🫢


⭐ SYNOPSIS ⭐

struct acpi_gpio_event {
    struct list_head node;
    acpi_handle handle;
    irq_handler_t handler;
    unsigned int pin;
    unsigned int irq;
    unsigned long irqflags;
    bool irq_is_wake;
    bool irq_requested;
    struct gpio_desc *desc;
 };

look at her. nine fields, zero notes πŸ’…


πŸ¦‹ Members πŸ¦‹

  • node β€” this is the list-entry for the events list that belongs to the struct acpi_gpio_chip. she's literally just holding her place in line πŸŽ€
  • handle β€” the handle of the ACPI method that gets executed when the IRQ triggers. like, this is the ACPI method's whole @ when the interrupt comes knocking πŸ”₯
  • handler β€” the handler function you pass to request_irq when you're requesting the IRQ. this one does the actual work when the interrupt fires ✨
  • pin β€” the GPIO pin number, on the struct gpio_chip. yes, exactly that one 🌸
  • irq β€” the Linux IRQ number for this event, used with request_irq / free_irq. it's the IRQ's government name fr fr πŸ’œ
  • irqflags β€” the flags you hand off to request_irq when requesting the IRQ. the little preferences sheet for the interrupt, iykyk πŸ¦‹
  • irq_is_wake β€” this one's true-ish in spirit: it's set if the ACPI flags indicate the IRQ is a wakeup source. nap-time alarm energy 😭
  • irq_requested β€” True if request_irq has been done. basically a "have we claimed this yet" bool, and it's icon status πŸ‘‘
  • desc β€” the struct gpio_desc for the GPIO pin of this event. the main character pointer for the pin itself ⭐

🧚 SEE ALSO 🧚

Kernel file ./drivers/gpio/gpiolib-acpi-core.c and its besties: 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_dev_gpio_irq_wake_get_by(9), acpi_gpio_count(9)

go read those too, bestie, they're all in the friend group 🫢🌈


ngl, every single field up there matters β€” no skipping, that's the whole assignment πŸ’€βœ¨

and that's the page!! mwah πŸ’– this came from the kernel source dir ./drivers/gpio, dated October 2026, and yeah β€” we were literally reading struct acpi_gpio_event(9) the whole time. slay, go touch some GPIOs (safely) πŸŽ€πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from