STRUCT GPIO_KEYS_PLATFORM_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

hey bestie!! welcome to the struct gpio_...latform_data(9) page from the Kernel API Manual πŸ’–βœ¨ we're talking about struct gpio_keys_platform_data, and it's lowkey the whole personality of the gpio_keys driver setup. it's giving kernel plumbing but make it cute πŸ’…

✨ NAME ✨

struct gpio_keys_platform_data β€” platform data for gpio_keys driver. that's the vibe, no cap 🫢

🌸 SYNOPSIS 🌸

okay so here's the struct in all its main-character glory ✨:

struct gpio_keys_platform_data {
    const struct gpio_keys_button *buttons;
    int nbuttons;
    unsigned int poll_interval;
    unsigned int rep:1;
    int (*enable)(struct device *dev);
    void (*disable)(struct device *dev);
    const char *name;
};

πŸŽ€ Members πŸŽ€

let's meet the members one by one, bestie β€” no skips, no cap πŸ’…

  • buttons β€” pointer to array of gpio_keys_button structures describing buttons attached to the device. that's the whole lineup, literally πŸ‘‘
  • nbuttons β€” number of elements in buttons array. the count, fr fr.
  • poll_interval β€” polling interval in msecs β€” for polling driver only. do not forget the "only," bestie 😭
  • rep β€” enable input subsystem auto repeat. auto repeat go brrr πŸ”₯
  • enable β€” platform hook for enabling the device. the "turn it on" hook ✨
  • disable β€” platform hook for disabling the device. the "turn it off" hook 🫢
  • name β€” input device name. iconic label energy πŸŽ€

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, iykyk πŸ‘‘

Kernel file ./include/linux/gpio_keys.h β€” and also struct gpio_keys_button(9) πŸ’– that's the see-also situation, bestie.


mwah πŸ’‹ this lil' page comes from ./include/linux, dated October 2026, and yes it's literally the struct gpio_...latform_data(9) page. bye bestie, go touch some kernel code 🫢✨

πŸ“¦ where this page comes from