omap2_set_gpio_debounce(9)
π¦ omap2_set_gpio_debounce β low level gpio debounce time π¦
okay so bestie, welcome to the omap2_set_gpio_debounce(9) page, straight out of the Kernel API Manual π this one's a little low-level gem and honestly? kind of iconic. let's get into it β¨
πΈ SYNOPSIS πΈ
int omap2_set_gpio_debounce (struct gpio_bank *bank , unsigned offset ,
unsigned debounce );
like, three args, one int back, no cap π«Ά
π ARGUMENTS π
bankβ the gpio bank we're acting upon, aka the main character of this whole operation πoffsetβ the gpio number on this bank, so you know exactly which lil guy we're talking about π£debounceβ the debounce time to use, like the whole point of the function fr fr β±οΈ
π DESCRIPTION π
okay so here's the tea β OMAP's debounce time is measured in 31us steps, and the formula goes like this:
<debounce time> = (GPIO_DEBOUNCINGTIME[7:0].DEBOUNCETIME + 1) x 31
so because the hardware thinks in those 31us chunks and you're out here thinking in actual time, we need to convert β and round up to the closest unit. highkey the rounding-up part matters, don't skip it πβ¨
π RETURN π
0on success π slay- negative error otherwise π not slay
π₯ SEE ALSO π₯
- Kernel file
./drivers/gpio/gpio-omap.c omap_clear_gpio_debounce(9)β the cleanup bestie, go check her out too π
ngl this one's short and sweet, but every detail counts β the 31us steps, the[7:0]field, the+ 1, thex 31, the rounding up, all of it. periodt π
and that's the whole vibe bestie π this page lives in ./drivers/gpio, dated October 2026, and it's filed under omap2_set_gpio_debounce(9) in the Kernel API Manual β mwah, go debounce something πππ¦
π¦ 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