ep93xx_spi_calc_divisors(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ep93xx_spi_calc_divisors ✨

okay so bestie, welcome to the Kernel API Manual β€” this one's a tiny little kernel helper from the SPI world, and it's literally just here to do math for you πŸ’…

πŸŽ€ NAME

ep93xx_spi_calc_divisors β€” the function that calculates SPI clock divisors ⭐

Like, that's it. That's the whole job. It does the clock math so you don't have to. Slay.


🌸 SYNOPSIS

int ep93xx_spi_calc_divisors (struct spi_controller *host , u32 rate ,
u8 *div_cpsr , u8 *div_scr );

Returns an int. Takes a host, a rate, and two pointers to write dividers into. Very demure, very mindful 🫢


πŸ¦‹ ARGUMENTS

  • host β€” the SPI host πŸŽ€ (your struct spi_controller *, the main character of this whole operation)
  • rate β€” the desired SPI output clock rate, as a u32. i.e. the speed you're dreaming of ✨
  • div_cpsr β€” pointer to return the cpsr (pre-scaler) divider β€” it writes the pre-scaler back out through here πŸ”₯
  • div_scr β€” pointer to return the scr divider through here 🌈

so yeah, you hand it the host + the rate you want, and it hands you back both dividers via those pointers. no cap.


πŸ‘‘ SEE ALSO

go read those if you wanna see the whole squad in action, iykyk πŸ’œ


ngl this one's short and sweet β€” no options, no env vars, no exit statuses, no bugs listed. just vibes, dividers, and a struct spi_controller *. drink water, check your return value, periodt πŸ’–

okay that's the whole page bestie!! this came from the source ./drivers/spi and it's dated October 2026 β€” so mark your calendar, mwah πŸ˜­πŸ«ΆπŸ’…

πŸ“¦ where this page comes from