STRUCT I2C_ATR_CHAN(9)
π struct i2c_atr_chan(9) β the kernel API manual, bestie edition β¨
okay so this is a page from the kernel API manual (you know, the (9) section, the one where all the structs live π«Ά). Buckle up, we're looking at struct i2c_atr_chan, and ngl it's giving "data for a channel" β literally that's what the NAME section says, and it ate. π
πΈ NAME πΈ
struct i2c_atr_chan β Data for a channel. that's it, that's the vibe, short and iconic β¨
π¦ SYNOPSIS π¦
here's the whole struct, character for character, don't touch anything, she's perfect:
struct i2c_atr_chan {
struct i2c_adapter adap;
struct i2c_atr *atr;
u32 chan_id;
struct mutex alias_pairs_lock;
struct lock_class_key alias_pairs_lock_key;
struct list_head alias_pairs;
struct i2c_atr_alias_pool *alias_pool;
struct mutex orig_addrs_lock;
struct lock_class_key orig_addrs_lock_key;
u16 *orig_addrs;
unsigned int orig_addrs_size;
};
π Members π
bestie. every single field, coming right up, no skipping, we don't do that here π
adapβ thestruct i2c_adapterfor the channel. main character adapter energy π₯atrβ the parent I2C ATR. hi mom πchan_idβ the ID of this channel, au32saying which one she is.alias_pairs_lockβ the mutex protectingalias_pairs. don't touch the list without her πΈalias_pairs_lock_keyβ the lock key foralias_pairs_lock. lockdep's little name tag π·οΈalias_pairsβ a list ofstruct i2c_atr_alias_paircontaining the assigned aliases. it's a whole roster, fr fr β¨alias_poolβ the pool of available client aliases. like a little alias lending library πorig_addrs_lockβ the mutex protectingorig_addrs. the second bouncer at the door π«Άorig_addrs_lock_keyβ the lock key fororig_addrs_lock. matching lanyard, obviously πorig_addrsβ buffer used to store the original addresses during transmit. memory, but make it useful π§orig_addrs_sizeβ the size oforig_addrs. we respect her dimensions, no cap π
lowkey the way this struct just holds everything together β a mutex, a lock key, a mutex, a lock key β it's giving matched set, it's giving organized π
β SEE ALSO β
if you liked this page, the kernel file at ./drivers/i2c/i2c-atr.c is the whole ecosystem, and these siblings ate too:
struct i2c_atr_alias_pair(9)struct i2c_atr_alias_pool(9)struct i2c_atr(9)
iykyk, go read them, they're literally right there πβ¨
and that's the page! this one lives over in ./drivers/i2c, dated October 2026 β so yes, this struct is a time traveler from the future, bow down πβπ slay, bye bestie! π¦π
π¦ 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