STRUCT I2C_DEV_DESC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct i2c_dev_desc(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so welcome to the Kernel API Manual, section 9, and today's main character is struct i2c_dev_desc β€” literally the I2C device descriptor. buckle up, it's short but it's iconic ✨


🌸 NAME 🌸

struct i2c_dev_desc β€” I2C device descriptor. that's it, that's the vibe. no cap πŸ’–


✨ SYNOPSIS ✨

here's the whole thing, bestie, look at her:

struct i2c_dev_desc {
    struct i3c_i2c_dev_desc common;
    struct i2c_client *dev;
    u16 addr;
    u8 lvr;
 };

literally four fields and she's running the whole plot 🫢


πŸ¦‹ Members πŸ¦‹

okay let's meet the cast, one by one:

  • common β€” the common part of the I2C device descriptor. like, the shared friend group of the descriptor world πŸ’…
  • dev β€” the I2C device object that got registered to the I2C framework. she's official, she's on the list πŸ‘‘
  • addr β€” the I2C device address. how you find her in the crowd πŸŽ€
  • lvr β€” the LVR (Legacy Virtual Register) that the I3C core needs so it knows about the I2C device's limitations. like a little note that says "hey, this one can't do everything" 😭

πŸ’œ Description πŸ’œ

okay so picture this: every single I2C device connected on the bus gets her own i2c_dev_desc. no sharing, no copying, one each, periodt πŸ’€

the core creates this object, and later it gets attached to the controller using struct_i3c_master_controller->ops->attach_i2c_dev. the way it literally just gets handed over 🀝

and struct_i2c_dev_desc is the internal representation of an I2C device that's connected on an I3C bus β€” like, the behind-the-scenes version, the understudy, the backstage pass 🧚

she also gets passed to all the struct_i3c_master_controller_ops hooks. everyone wants a piece of her, honestly πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, no one left out, iykyk:


bestie reminder: these page refs are exactly as written, don't come for me if you think one looks weird πŸ’…

🌈 that's the whole page, you ate that honestly. this came to you straight from the source file ./include/linux/i3c, dated October 2026, and it's filed under struct i2c_dev_desc(9). go forth and describe some I2C devices, queen πŸ‘‘πŸ’–

πŸ“¦ where this page comes from