STRUCT GPIO_KEYS_BUTTON(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so welcome to the struct gpio_keys_button(9) page in the Kernel API Manual, bestie ✨ this struct is literally all about configuration parameters β€” the NAME is struct gpio_keys_button β€” configuration parameters. periodt πŸ’…


✨ SYNOPSIS ✨

       struct gpio_keys_button {
           unsigned int code;
         #ifdef CONFIG_GPIOLIB_LEGACY;
           int gpio;
         #endif;
           int active_low;
           const char *desc;
           unsigned int type;
           int wakeup;
           int wakeup_event_action;
           int debounce_interval;
           bool can_disable;
           int value;
           unsigned int irq;
           unsigned int wakeirq;
        };

πŸŽ€ Members πŸŽ€

  • code β€” input event code (KEY_*, SW_*) πŸ’–
  • gpio β€” -1 if this key does not support gpio πŸ¦‹
  • active_low β€” true indicates that button is considered depressed when gpio is low
  • desc β€” label that will be attached to button's gpio 🏷️
  • type β€” input event type (EV_KEY, EV_SW, EV_ABS) ⭐
  • wakeup β€” configure the button as a wake-up source 😴
  • wakeup_event_action β€” event action to trigger wakeup
  • debounce_interval β€” debounce ticks interval in msecs ⏱️
  • can_disable β€” true indicates that userspace is allowed to disable button via sysfs 🫢
  • value β€” axis value for EV_ABS
  • irq β€” Irq number in case of interrupt keys ⚑
  • wakeirq β€” Optional dedicated wake-up interrupt πŸŒ™

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./include/linux/gpio_keys.h struct gpio_keys_platform_data(9)

mwah πŸ’‹ β€” that’s the whole vibe from ./include/linux, dated October 2026, for the struct gpio_keys_button(9) page. you ate this, bestie 🫢

πŸ“¦ where this page comes from