STRUCT GPIO_V2_LINE_EVENT(9)
β¨ struct_gpio_v2_line_event(9) β¨
okay bestie, so we're in the Kernel API Manual today and the star of the show is struct gpio_v2_line_event(9) β like, this is a kernel manpage, yes, but it's that girl. buckle up π
πΈ NAME πΈ
struct gpio_v2_line_event β literally the actual event that gets pushed to userspace. that's it, that's the whole vibe. it's the little packet of joy that shows up when a GPIO line does a thing π
π¦ SYNOPSIS π¦
struct gpio_v2_line_event {
__aligned_u64 timestamp_ns;
__u32 id;
__u32 offset;
__u32 seqno;
__u32 line_seqno;
__u32 padding[6];
};
look at her. impeccable. no notes. β¨
π Members π
timestamp_nsβ the best estimate of when the event actually happened, in nanoseconds. it's an estimate, not a promise, ok? she's doing her best π«Άidβ the event identifier, and its value comes fromenum gpio_v2_line_event_id. iykykoffsetβ the offset of the line that triggered the event. the main character of this particular event, fr.seqnoβ the sequence number for this event within the sequence of events for all the lines in this line request. so like, the group chat's message count π¬line_seqnoβ the sequence number for this event within the sequence of events on this particular line. so like, that one friend's personal message count. two different counters, both valid πpaddingβ reserved for future use. don't touch. she's saving that space for later π
π Description π
so by default, timestamp_ns is read from CLOCK_MONOTONIC, and the whole point is to let you accurately measure the time between events. it does not give you wall-clock time β like, it's not gonna tell you "it's 3pm", it's gonna tell you "this happened 400ns after that". don't @ me π
if the GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME flag is set, then timestamp_ns is read from CLOCK_REALTIME instead. different clock, different vibe β
and if the GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE flag is set, then timestamp_ns is provided by the hardware timestamping engine (HTE) subsystem. hardware said "i got this" π₯
π SEE ALSO π
- Kernel file
./include/uapi/linux/gpio.hstruct gpiochip_info(9) enum gpio_v2_line_flag(9)struct gpio_v2_line_values(9)enum gpio_v2_line_attr_id(9)struct gpio_v2_line_attribute(9)struct gpio_v2_line_config_attribute(9)struct gpio_v2_line_config(9)struct gpio_v2_line_request(9)struct gpio_v2_line_info(9)enum gpio_v2_line_changed_type(9)struct gpio_v2_line_info_changed(9)enum gpio_v2_line_event_id(9)struct gpioline_info(9)struct gpioline_info_changed(9)struct gpiohandle_request(9)struct gpiohandle_config(9)struct gpiohandle_data(9)struct gpioevent_request(9)struct gpioevent_data(9)
the whole friend group, honestly. go say hi π«Ά
and that's the page, bestie!! source is ./include/uapi/linux, dated October 2026, and it's filed under struct gpio_v2_line_event(9) β slay, periodt, go read your GPIO events πβ¨ππ¦
π¦ 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