i2c_adapter_unlock_bus(9)
πΈ i2c_adapter_unlock_bus(9) πΈ
okay bestie, so this is a page from the Kernel API Manual, section 9, and it's literally all about letting go of an I2C bus segment β releasing that exclusive access you grabbed earlier. think of it as the un-clutching, the "okay you can have it back now π ". no gatekeeping here, we share.
β¨ NAME β¨
i2c_adapter_unlock_bus β release exclusive access to an I2C bus segment π«Ά
π¦ SYNOPSIS π¦
void i2c_adapter_unlock_bus (struct i2c_adapter *adapter , unsigned int
flags );
yep that's it, that's the whole vibe β returns nothing (void), takes an adapter and some flags. lowkey iconic for how unbothered it is.
π ARGUMENTS π
adapterβ the target I2C bus segment. this is the bus you're handing back, the main character of the whole operation πflagsβ okay so this is the important one, pay attention bestie:I2C_LOCK_ROOT_ADAPTERunlocks the root i2c adapter, like the whole entire thing at the top of the tree. andI2C_LOCK_SEGMENTunlocks only this branch in the adapter tree β just your little corner, not the whole family tree π³ so pick your fighter wisely, the scope is literally different.
π SEE ALSO π
- Kernel file
./drivers/i2c/i2c-core-base.c i2c_verify_client(9)i2c_adapter_lock_bus(9)β the one that takes the lock, the lock's other half fr fri2c_adapter_trylock_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)
π friendly reminder from your girl: if you locked it, you unlock it. no leaving the bus held hostage, that's not the energy we're bringing to the kernel.
okay that's the page!! π this one lives in ./drivers/i2c and it's dated October 2026 β yes, future-dated, she's ahead of her time π
β¨ go off, i2c_adapter_unlock_bus(9), 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