STRUCT I2C_ATR_CHAN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” the struct i2c_adapter for the channel. main character adapter energy πŸ”₯
  • atr β€” the parent I2C ATR. hi mom πŸ‘‘
  • chan_id β€” the ID of this channel, a u32 saying which one she is.
  • alias_pairs_lock β€” the mutex protecting alias_pairs. don't touch the list without her 🌸
  • alias_pairs_lock_key β€” the lock key for alias_pairs_lock. lockdep's little name tag 🏷️
  • alias_pairs β€” a list of struct i2c_atr_alias_pair containing 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 protecting orig_addrs. the second bouncer at the door 🫢
  • orig_addrs_lock_key β€” the lock key for orig_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 of orig_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