i2c_atr_new(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 πŸ”₯

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 under i2c_atr_new(9) β€” periodt πŸ’…βœ¨
πŸ“¦ where this page comes from