STRUCT I2C_ATR_OPS(9)
π struct i2c_atr_ops(9)
okay so this is a page from the Kernel API Manual and bestie, it's literally the callback menu that ATR hands to your device driver β¨ like, "here's what you gotta do when stuff happens," and you go slay. no cap.
πΈ NAME πΈ
struct i2c_atr_ops β Callbacks from ATR to the device driver π«Ά
β¨ SYNOPSIS β¨
struct i2c_atr_ops {
int (*attach_addr)(struct i2c_atr *atr, u32 chan_id, u16 addr, u16 alias);
void (*detach_addr)(struct i2c_atr *atr, u32 chan_id, u16 addr);
};
π Members π
attach_addrβ this one's like the group-chat notification for a new device π it notifies the driver that a new device connected on a child bus, and it comes with the alias that got assigned to it. the driver must configure the hardware to use the alias β like, non-negotiable, that's the whole vibe.detach_addrβ the breakup text π it notifies the driver that a device is getting disconnected. the driver must configure the hardware to stop using the alias. no lingering situationships with stale aliases, periodt.
π₯ Description π₯
All these functions return 0 on success, and a negative error code otherwise. that's it, that's the rule π
π¦ SEE ALSO π¦
Kernel file ./include/linux/i2c-atr.h, plus the whole friend group: enum i2c_atr_flags(9), struct i2c_atr_adap_desc(9), i2c_atr_new(9), i2c_atr_delete(9), i2c_atr_add_adapter(9), i2c_atr_del_adapter(9), i2c_atr_set_driver_data(9), i2c_atr_get_driver_data(9) π
ngl this page lives at ./include/linux, dated October 2026, and it's serving struct i2c_atr_ops(9) energy from the KAPI manual. mwah π go configure that hardware 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