STRUCT GPIOEVENT_REQUEST(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, like GPIOHANDLE_REQUEST_ACTIVE_LOW or GPIOHANDLE_REQUEST_OPEN_DRAIN. iconic little toggles, no cap πŸ¦‹
  • eventflags β€” desired flags for the desired GPIO event line, such as GPIOEVENT_REQUEST_RISING_EDGE or GPIOEVENT_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 successful GPIO_GET_LINEEVENT_IOCTL operation, 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