i2c_verify_client(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ i2c_verify_client ✨

okay bestie, welcome to the Kernel API Manual πŸ’– this one is short but it's lowkey a lifesaver, no cap.


🌸 NAME 🌸

i2c_verify_client β€” gives you back your parameter as an i2c_client, or hands you NULL 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

struct i2c_client * i2c_verify_client (struct device *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” a device, and like... probably one you got from some driver model iterator πŸ‘€ that's the whole vibe here.

⭐ DESCRIPTION ⭐

so picture this: you're traversing the driver model tree, maybe with those driver model iterators like device_for_each_child, and bestie, you genuinely can't assume very much about the nodes you find. like, at all. πŸ™ˆ

that's exactly why this function exists β€” use it to avoid oopses caused by wrongly treating some non-I2C device as an i2c_client. because that would be a whole mess 😭 it's giving "trust but verify."


πŸ’œ SEE ALSO πŸ’œ

kernel file ./drivers/i2c/i2c-core-base.c and honestly the whole friend group πŸ’…:


okay that's the whole page, go be safe out there in the driver model tree πŸŒˆπŸ¦‹

mwah πŸ’‹ this icon was brought to you by the source tree at ./drivers/i2c, dated October 2026 β€” catch you in the next manpage bestie, periodt πŸ‘‘βœ¨

πŸ“¦ where this page comes from