i2c_find_adapter_by_fwnode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, welcome to i2c_find_adapter_by_fwnode(9) from the Kernel API Manual β€” it’s the function that’s literally like β€œwhere is my i2c adapter?” but for a fwnode. It’s giving lookup energy, no cap. πŸ¦‹

✨ SYNOPSIS ✨

struct i2c_adapter * i2c_find_adapter_by_fwnode (struct fwnode_handle
*fwnode );

🌸 ARGUMENTS 🌸

  • fwnode β€” the struct fwnode_handle corresponding to the struct i2c_adapter. That’s the little handle, bestie. πŸ’…

πŸŽ€ DESCRIPTION πŸŽ€

okay so here’s the whole vibe: it looks up and returns the struct i2c_adapter corresponding to the fwnode. If no adapter can be found, or if fwnode is NULL, this returns NULL. Periodt. πŸ’€

⚠️ cleanup check, bestie: the user must call put_device(adapter->dev) once done with the i2c adapter. Do not skip that β€” it’s literally required. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/i2c/i2c-core-base.c β€” and the whole iconic friend group is:


πŸ’– xoxo, bestie β€” source/version: ./drivers/i2c, date: October 2026, page: i2c_find_adapter_by_fwnode(9). slay and goodbye. 🫢

πŸ“¦ where this page comes from