gpio_keys_enable_button(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 the struct 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 🌈


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