STRUCT I2C_ATR_ADAP_DESC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so real talk: this page lives in the Kernel API Manual, and honestly? it's the glow-up blueprint for one single thing β€” an ATR downstream bus descriptor. that's it. that's the whole vibe. πŸ¦‹


✨ NAME ✨

struct i2c_atr_adap_desc β€” An ATR downstream bus descriptor πŸŽ€

like, it's the little form you fill out to describe one downstream bus. no notes, iconic behaviour.


🌸 SYNOPSIS 🌸

struct i2c_atr_adap_desc {
    u32 chan_id;
    struct device *parent;
    struct fwnode_handle *bus_handle;
    size_t num_aliases;
    u16 *aliases;
 };

that's the whole struct, bestie. five fields. memorise it, screenshot it, whatever 😭


πŸ‘‘ Members πŸ‘‘

  • chan_id β€” the index of the new adapter, and it lives in the range 0 .. max_adapters-1 (yes, that exact range, respect it). this value gets passed to the callbacks in struct i2c_atr_ops. so like, it's giving "my name is on the list" energy. πŸ’…
  • parent β€” the device being used as the parent of the new i2c adapter. or you can set it to NULL and it'll use the i2c-atr device as the parent instead. choose your parent wisely, main character energy either way. 🫢
  • bus_handle β€” the fwnode handle that points to the adapter's i2c peripherals. or NULL. that's it. optional bestie behaviour. 🌈
  • num_aliases β€” the number of aliases in this adapter's private alias pool. set it to zero if this adapter uses the ATR's global alias pool instead. ngl this one's lowkey important, don't skip it. πŸ”₯
  • aliases β€” an optional array of private aliases used by the adapter instead of the ATR's global pool of aliases. and listen: it must contain exactly num_aliases entries if num_aliases > 0. if not, it's ignored, no cap. πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, literally:

they all ate, honestly. go read them. πŸ“


ok one last thing: this page is chillin' in ./include/linux, dated October 2026. screenshot the struct, tell your friends, slay the day away πŸ’–βœ¨πŸ§š

that's the whole page bestie, you're so welcome, mwah πŸ’œ

πŸ“¦ where this page comes from