gpio_keys_enable_button(9)
β¨ gpio_keys_enable_button(9) β¨
okay so we're in the Kernel API Manual today bestie, and the star of the show is gpio_keys_enable_button(9) β a whole kernel function whose entire personality is "turn a GPIO button back on." iconic behavior honestly π
π NAME π
gpio_keys_enable_button β enables given GPIO button. that's it. that's the whole job. and she does it slayfully π«Ά
πΈ SYNOPSIS πΈ
void gpio_keys_enable_button (struct gpio_button_data *bdata );
void return, one pointer argument, zero drama. well β almost zero drama, keep reading π
π¦ ARGUMENTS π¦
bdataβ button data for button to be disabled. and yes, the original manpage literally says "to be disabled" here even though the function is the enable one. not me catching that π but fr fr that's the actual wording, so I'm passing it straight to you, no cap. it's thestruct gpio_button_data *for the button in question.
π DESCRIPTION π
Enables the given button, the one pointed at by bdata. that's the vibe. button goes from "nope" to "yep." β¨
β οΈ okay this part is the important part, bestie, pay attention: you gotta make sure that bdata->disable_lock is locked when you enter this function. why? to avoid races with concurrent threads that are trying to enable the same button at the same time. it's giving two people grabbing the same iced coffee at once. lock it or things get cursed ππ
π SEE ALSO π
- Kernel file
./drivers/input/keyboard/gpio_keys.c get_n_events_by_type(9)get_bm_events_by_type(9)gpio_keys_disable_button(9)gpio_keys_attr_show_helper(9)gpio_keys_attr_store_helper(9)
that's the whole page, king π it lives over in ./drivers/input/keyboard, and this lil doc is dated October 2026 β so yeah, bookmark it, screenshot it, send it to the group chat. bye bestie, go lock that disable_lock π§ββοΈπ
π¦ 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