STRUCT GPIO_KEYS_PLATFORM_DATA(9)
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 ofgpio_keys_buttonstructures describing buttons attached to the device. that's the whole lineup, literally πnbuttonsβ number of elements inbuttonsarray. 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
- 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