STRUCT GPIOEVENT_REQUEST(9)
π struct gpioevent_request(9) β the Kernel API Manual glow-up
okay so bestie, welcome to the kernel API manual, and today's main character is struct gpioevent_request β¨ β literally the little info packet that tells the kernel "hey, I wanna subscribe to events on this GPIO line, bestie, please π₯Ί".
πΈ NAME πΈ
struct gpioevent_request β Information about a GPIO event request π
β¨ SYNOPSIS β¨
struct gpioevent_request {
__u32 lineoffset;
__u32 handleflags;
__u32 eventflags;
char consumer_label[GPIO_MAX_NAME_SIZE];
int fd;
};
like, that's the whole vibe. five fields, zero drama π
π Members π
lineoffsetβ the desired line to subscribe to events from, specified by offset index for the associated GPIO device. it's giving "which one, bestie? point at it π"handleflagsβ desired handle flags for the desired GPIO line, likeGPIOHANDLE_REQUEST_ACTIVE_LOWorGPIOHANDLE_REQUEST_OPEN_DRAIN.iconic little toggles, no cap π¦eventflagsβ desired flags for the desired GPIO event line, such asGPIOEVENT_REQUEST_RISING_EDGEorGPIOEVENT_REQUEST_FALLING_EDGE.like, do you want the edge going up or down? choose ur fighter β¬οΈβ¬οΈconsumer_labelβ a desired consumer label for the selected GPIO line(s) such as"my-listener"β yes that's literally the example, she's a whole aesthetic π·οΈfdβ after a successfulGPIO_GET_LINEEVENT_IOCTLoperation, contains a valid anonymous file descriptor representing the request. the payoff!!! the moment!!! π₯
π Note π
This struct is part of ABI v1 and is deprecated. Use ABI v2 and struct gpio_v2_line_request instead.
fr fr, she's retired, she's legacy, we still respect her but the v2 one is the upgrade, periodt π
π«Ά SEE ALSO π«Ά
Kernel file ./include/uapi/linux/gpio.h and the whole friend group:
struct 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 gpio_v2_line_event(9)struct gpioline_info(9)struct gpioline_info_changed(9)struct gpiohandle_request(9)struct gpiohandle_config(9)struct gpiohandle_data(9)struct gpioevent_data(9)
and that's the page, bestie π it lives in the Kernel API Manual, sourced from ./include/uapi/linux, dated October 2026 β so yeah, shoutout to the kernel API manual era, slay π§πΈβ
π¦ 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