gpio_keys_disable_button(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ gpio_keys_disable_button ✨

okay bestie, welcome to the Kernel API Manual πŸ’… this is the page for gpio_keys_disable_button, and yes it does exactly what it says on the tin: it disables a given GPIO button. no cap.


πŸŽ€ NAME πŸŽ€

gpio_keys_disable_button β€” disables given GPIO button 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

void gpio_keys_disable_button (struct gpio_button_data *bdata );

🌸 ARGUMENTS 🌸

  • bdata β€” button data for the button to be disabled. that's the whole vibe, bestie πŸ’–

πŸ’– DESCRIPTION πŸ’–

so basically this disables the button pointed to by bdata 😌 and the way it does that is by masking the IRQ line. iconic, honestly.

after this function is called, the button won't generate input events anymore. periodt. ✨

⚠️ note that one can only disable buttons that don't share IRQs. that's a real caveat, bestie β€” don't skip it πŸ™ˆ

also, make sure that bdata->disable_lock is locked when entering this function, to avoid races when concurrent threads are disabling buttons at the same time. like, literally lock it before you come in here πŸ”’βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘


mwah πŸ’‹ this lil page comes from the source/version at ./drivers/input/keyboard, dated October 2026 β€” slay, go read the kernel source, bestie πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from