i2c_atr_new(9)
π i2c_atr_new β all up in the Kernel API Manual, bestie π
okay so real talk, this page is i2c_atr_new(9) from the Kernel API Manual, and it's literally the birth certificate for an I2C ATR helper β¨ buckle up π
πΈ NAME πΈ
i2c_atr_new β allocate and initialize an I2C ATR helper. that's it, that's the vibe π
π¦ SYNOPSIS π¦
struct i2c_atr * i2c_atr_new (struct i2c_adapter *parent , struct device
*dev , const struct i2c_atr_ops *ops , int max_adapters , u32 flags );
like, copy it exactly, no cap, character for character π«Ά
π ARGUMENTS π
parentβ the parent (upstream) adapter, aka the main character it's attaching to πdevβ the device that's acting as an ATR π§opsβ driver-specific callbacks, your custom lore πmax_adaptersβ maximum number of child adapters, set your limit bestie π¦flagsβ flags for ATR, the little switches βοΈ
π DESCRIPTION π
so the new ATR helper is connected to the parent adapter, right? but it has no child adapters β it's giving freshly-launched, zero followers energy π if you want kids (adapters, to be clear), you gotta call i2c_atr_add_adapter to add some π
and when you're done with the whole thing? call i2c_atr_delete to remove it. clean up after yourself, we love a responsible icon π
β RETURN β
it hands you back a pointer to the new ATR helper object πΈ β or ERR_PTR if things went sideways π always check, iykyk.
π₯ SEE ALSO π₯
- Kernel file
./include/linux/i2c-atr.hπ enum i2c_atr_flags(9)struct i2c_atr_ops(9)struct i2c_atr_adap_desc(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)
go read them, they ate π«Ά
okay tiny little send-off: this masterpiece lives in./include/linux, it's dated October 2026, and it's filed underi2c_atr_new(9)β periodt π β¨
π¦ 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