STRUCT LOONGSON2_I2C_PRIV(9)
β¨ struct loongson2_i2c_priv(9) β¨
okay bestie, so this is a page straight out of the Kernel API Manual and it's literally all about struct loongson2_i2c_priv β the private data of the controller π no cap, that's the whole vibe. it's giving "small struct, big responsibility" and honestly? we're obsessed π
πΈ NAME πΈ
struct loongson2_i2c_priv β the private data of the controller π«Ά
β SYNOPSIS β
here's the whole thing, character for character, don't @ me:
struct loongson2_i2c_priv {
struct i2c_adapter adapter;
struct completion complete;
struct clk *clk;
struct regmap *regmap;
unsigned long parent_rate_MHz;
struct loongson2_i2c_msg msg;
};
like, look at her. six members. main character energy π
π¦ Members π¦
okay so let's meet the cast one by one, they all matter, nobody gets skipped:
adapterβ the I2C adapter for this controller π she's the whole point, fr frcompleteβ the completion of I2C message β¨ it's how we know a message is done, iykykclkβ the hw i2c clock β° hardware clock, not a vibe, an actual clockregmapβ the regmap of the I2C device πΊοΈ yes bestie, a regmap, exactly like it soundsparent_rate_MHzβ the I2C clock parent rate π (it's anunsigned long, and the name literally tells you the units, love that for us)msgβ the I2C transfer information π¨ a wholestruct loongson2_i2c_msg, living right here inside
lowkey note: the struct in the synopsis really does end with that little indented }; β that's just how the page shows it, we're keeping it exactly as-is π
π SEE ALSO π
if you wanna go deeper (and you know you do), go check out:
- the Kernel file
./drivers/i2c/busses/i2c-ls2x-v2.cstruct loongson2_i2c_msg(9)π
and that's the whole page, bestie!! π straight from ./drivers/i2c/busses, dated October 2026 β mwah, slay, periodt π
β¨π§
π¦ 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