STRUCT LINEEVENT_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct lineevent_state(9) πŸ’–

okay bestie, so this is from the Kernel API Manual and it's literally the whole personality of a userspace event, like the state that holds the entire vibe of one. sit down, hydrate, let's go 🫢


✨ NAME ✨

struct lineevent_state β€” contains the state of a userspace event πŸ’…

like yes that's the whole name and it ate, no notes


🌸 SYNOPSIS 🌸

struct lineevent_state {
    struct gpio_device *gdev;
    const char *label;
    struct gpio_desc *desc;
    u32 eflags;
    int irq;
    wait_queue_head_t wait;
    struct notifier_block device_unregistered_nb;
    struct gpioevent_data *events;
    u64 timestamp;
 };

that's the whole struct, every field, exactly as it lives in the kernel, not me editing anything, i would NEVER 😀


πŸŽ€ Members πŸŽ€

  • gdev β€” the GPIO device this event is about, like the main character it's attached to πŸ‘‘
  • label β€” the consumer label, used to tag descriptors, so you know who this event belongs to 🏷️
  • desc β€” the GPIO descriptor that this event is literally holding onto πŸ’–
  • eflags β€” the event flags this line was requested with, so it remembers its own settings fr fr
  • irq β€” the interrupt that triggers in response to events on this GPIO ⚑
  • wait β€” the wait queue that handles blocking reads of events, aka where your read goes to nap 😴
  • device_unregistered_nb β€” the notifier block for receiving gdev unregister events, so we hear about the breakup πŸ“΅
  • events β€” the KFIFO for the GPIO events, a little first-in-first-out cutie lineup 🧚
  • timestamp β€” a cache for the timestamp, storing it between the hardirq and the IRQ thread, used to bring the timestamp close to the actual event β€” like it's right there when the thing happens, not fashionably late ⏰

πŸ¦‹ SEE ALSO πŸ¦‹

all the linked besties, go read them, iykyk πŸ’œ


lowkey a reminder that this is kernel API territory β€” respect the struct, don't go inventing fields, the compiler will absolutely humble you πŸ’€

so yeah that's the page 🌈 and for the sign-off: this one comes from the source path ./drivers/gpio, dated October 2026, and it's filed under struct lineevent_state(9) β€” iconic, no cap πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from