gpiod_set_debounce(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… gpiod_set_debounce(9)

okay so bestie, welcome to the Kernel API Manual page for gpiod_set_debounce(9) β€” the little function that tells a GPIO line "hey, chill for a sec before you count that as a real edge." Debounce is literally the thing standing between you and a hundred phantom interrupts from a janky button, so yeah, she's kind of a main character. πŸŽ€


✨ NAME ✨

gpiod_set_debounce β€” sets @debounce time for a GPIO

No cap, that's the whole job. One line, one time value, vibes only. πŸ¦‹


🌸 SYNOPSIS 🌸

int gpiod_set_debounce (struct gpio_desc *desc , unsigned int debounce
);

🫢 ARGUMENTS 🫢

  • desc β€” descriptor of the GPIO for which to set debounce time. like, the specific line you're obsessed with rn πŸ’–
  • debounce β€” debounce time in microseconds. that's the window where the hardware is like "nope, not yet, still settling" ⏳

⭐ RETURN ⭐

  • 0 on success β€” slay, it worked πŸŽ‰
  • -ENOTSUPP if the controller doesn't support setting the debounce time β€” not every chip has this feature bestie, and that's on them πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Also from the kernel file ./drivers/gpio/gpiolib.c, a whole friend group of GPIO functions β€” every single one of them, no skips, no cuts 🧚:


and that's the whole page, bestie!! πŸ’œ

<tul>sign-off szn</tul> β€” this lil masterpiece lives in ./drivers/gpio, dated October 2026, and it's page gpiod_set_debounce(9) of the Kernel API Manual. go set some debounce times, ily, bye πŸ“βœ¨

πŸ“¦ where this page comes from