i2c_adapter_trylock_bus(9)
β¨ NAME β¨
okay so bestie, this is i2c_adapter_trylock_bus from the Kernel API Manual, and its whole thing is: try to get exclusive access to an I2C bus segment. that's the vibe. no cap. π
πΈ SYNOPSIS πΈ
the signature is literally right here, character for character:
int i2c_adapter_trylock_bus (struct i2c_adapter *adapter , unsigned int
flags );
π ARGUMENTS π
adapterβ the target I2C bus segment. that's the one you're trying to lock, bestie π«Άflagsβ the lock-mode cutie:I2C_LOCK_ROOT_ADAPTERtrylocks the root i2c adapter, whileI2C_LOCK_SEGMENTtrylocks only this branch in the adapter tree. iykyk β¨
π¦ SEE ALSO π¦
the kernel file is ./drivers/i2c/i2c-core-base.c, and the whole friend group is: i2c_verify_client(9), i2c_adapter_lock_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). periodt. π₯
mwah π this iconic little page comes from ./drivers/i2c, dated October 2026, and it's i2c_adapter_trylock_bus(9) β go be your main character self with those bus locks π«Άπ
π¦ 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