i2c_verify_client(9)
β¨ 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 π
:
i2c_adapter_lock_bus(9)i2c_adapter_trylock_bus(9)i2c_adapter_unlock_bus(9)i2c_new_client_device(9)i2c_unregister_device(9)i2c_find_device_by_fwnode(9)i2c_new_dummy_device(9)devm_i2c_new_dummy_device(9)i2c_new_ancillary_device(9)i2c_verify_adapter(9)i2c_handle_smbus_host_notify(9)i2c_add_adapter(9)i2c_add_numbered_adapter(9)i2c_del_adapter(9)devm_i2c_add_adapter(9)i2c_find_adapter_by_fwnode(9)i2c_get_adapter_by_fwnode(9)i2c_parse_fw_timings(9)i2c_del_driver(9)__i2c_transfer(9)i2c_transfer(9)i2c_transfer_buffer_flags(9)i2c_get_device_id(9)i2c_client_get_device_id(9)i2c_get_dma_safe_msg_buf(9)i2c_put_dma_safe_msg_buf(9)
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
- 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