rk3x_i2c_v0_calc_timings(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 rk3x_i2c_v0_calc_timings β€” kernel API manual energy ✨

okay so bestie, we're in the rk3x_i2c_v0_calc_timings(9) era and honestly? iconic. this is the kernel API manual page for it, and yes it's a function name that looks like someone fell asleep on their keyboard, but we're gonna get through it together 🫢


✨ NAME ✨

rk3x_i2c_v0_calc_timings β€” no literally, its whole job is to calculate divider values for your desired SCL frequency. that's it. that's the gig. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

int rk3x_i2c_v0_calc_timings (unsigned long clk_rate , struct
i2c_timings *t , struct rk3x_i2c_calced_timings *t_calc );

three args, one int coming back at you. lowkey simple, highkey important. ⭐


πŸ¦‹ ARGUMENTS πŸ¦‹

  • clk_rate β€” the I2C input clock rate. like, the raw clock speed going in. know it, love it, pass it. πŸ•
  • t β€” the known I2C timing information. you already have this, bestie, you're just handing it over so the function can do its thing. 🎁
  • t_calc β€” the calculated rk3x private timings that would be written into regs. this is the output slot, the little container where the freshly computed values get dropped. it's giving "here's your results, ma'am" 😌

πŸ”₯ RETURN πŸ”₯

so what comes back? buckle up:

  • 0 on success β€” we ate, no notes. πŸ‘‘
  • -EINVAL if the goal SCL rate is too slow. but listen β€” it's not a total loss, because in that case a best-effort divider value is returned in divs. so you still get something, it's just doing its best 😭
  • and if the target rate is too high? we don't even say anything about it. we silently use the highest possible rate. no error, no drama, just vibes and maximum speed πŸ’€
fr fr, note that "silently" β€” no warning, no complaint. you just get the highest possible rate and that's that. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

the friend group, the whole squad, the SEE ALSO lineup. everything's hanging out in the kernel file ./drivers/i2c/busses/i2c-rk3x.c:

like, that's the whole group chat right there. go say hi 🧚


and that's the page!! this little beauty lives over in ./drivers/i2c/busses, and it's dated October 2026 (yes, future girlie energy ⏳). signing off with the full title <pink>rk3x_i2c_v0_calc_timings(9)</pink> β€” ily, go calculate some dividers, periodt πŸ’–βœ¨

πŸ“¦ where this page comes from