i2c_parse_fw_timings(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… i2c_parse_fw_timings(9) β€” like, the Kernel API Manual one, bestie ✨

okay so this is a page from the Kernel API Manual, and it's literally all about pulling I2C timing params out of firmware. no cap, it's a whole vibe. πŸ¦‹


✨ NAME ✨

i2c_parse_fw_timings β€” get your I2C-related timing parameters straight out of firmware, periodt πŸ’–


🌸 SYNOPSIS 🌸

void i2c_parse_fw_timings (struct device *dev , struct i2c_timings *t ,
       bool use_defaults );

like, that's the whole signature. slay. πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device we're scanning for those I2C timing properties πŸ”
  • t β€” the i2c_timings struct that's gonna get filled up with values, bestie πŸ’«
  • use_defaults β€” a bool that says "yes please use the sane defaults derived from the I2C specification when properties aren't found" β€” otherwise it just doesn't update anything, kthx πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

So the whole thing is: scan the device for the generic I2C properties that describe timing parameters for the signal, then fill the given struct with the results. Easy. Iconic. ✨

If a property wasn't found and use_defaults was true, then maximum timings are assumed β€” and those come straight from the I2C specification, ngl that's the whole point 🫢

If use_defaults isn't used, the results will be as before, so drivers can apply their own defaults before calling this helper. The way that works is: that latter bit is mainly intended for avoiding regressions of existing drivers that want to switch over to this function. New drivers almost always should use the defaults, fr fr. πŸ’―

lowkey important: the "don't update" path is a compatibility thing for older drivers, not a cool new-driver flex πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/i2c/i2c-core-base.c and honestly the whole friend group:


okay that's the whole page, mwah πŸ’‹ this lil cutie lives down in ./drivers/i2c, it's dated October 2026, and the man page itself is i2c_parse_fw_timings(9) β€” go off, bestie, you ate that πŸ“πŸ’€βœ¨

πŸ“¦ where this page comes from