omap2_set_gpio_debounce(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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 πŸ“

  • 0 on success πŸŽ‰ slay
  • negative error otherwise 😭 not slay

πŸ”₯ SEE ALSO πŸ”₯


ngl this one's short and sweet, but every detail counts β€” the 31us steps, the [7:0] field, the + 1, the x 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