i2c_adapter_trylock_bus(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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_ADAPTER trylocks the root i2c adapter, while I2C_LOCK_SEGMENT trylocks 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