STRUCT LOONGSON2_I2C_PRIV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 fr
  • complete β€” the completion of I2C message ✨ it's how we know a message is done, iykyk
  • clk β€” the hw i2c clock ⏰ hardware clock, not a vibe, an actual clock
  • regmap β€” the regmap of the I2C device πŸ—ΊοΈ yes bestie, a regmap, exactly like it sounds
  • parent_rate_MHz β€” the I2C clock parent rate πŸ“ˆ (it's an unsigned long, and the name literally tells you the units, love that for us)
  • msg β€” the I2C transfer information πŸ“¨ a whole struct 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.c struct
  • 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