i2c_lock_bus(9)
π i2c_lock_bus(9) β like, the actual Kernel API Manual page π
okay so bestie, welcome to the glow-up of i2c_lock_bus(9) from the Kernel API Manual β¨ this is the whole page, every crumb of it, just with the vibes turned ALL the way up. grab a boba and let's go π§
β¨ NAME β¨
i2c_lock_bus β get exclusive access to an I2C bus segment ππ
like literally, you're claiming the bus. nobody else gets a turn until you say so. main character energy fr fr.
πΈ SYNOPSIS πΈ
void i2c_lock_bus (struct i2c_adapter *adapter , unsigned int flags );
yep that's it. that's the whole signature. void return so nothing comes back at you, and yes there's a space before that comma in the original β she's iconic, we keep her exactly as she is π
π¦ ARGUMENTS π¦
adapterβ target I2C bus segment π― like, which bus are we locking? this one. the one you're pointing at.flagsβ the vibe selector, two options and they are NOT the same:I2C_LOCK_ROOT_ADAPTERβ locks the root i2c adapter π goes all the way up to the top of the tree, no cap.I2C_LOCK_SEGMENTβ locks only this branch in the adapter tree πΏ just your little corner, nothing else. very "this is my section" of it.
so pick your fighter: whole root, or just the segment. choose wisely bestie π«Ά
π SEE ALSO π
this one comes with a whole friend group, they all live in the kernel file ./include/linux/i2c.h π so go say hi to:
i2c_master_recv(9)i2c_master_recv_dmasafe(9)i2c_master_send(9)i2c_master_send_dmasafe(9)struct i2c_device_identity(9)enum i2c_driver_flags(9)struct i2c_driver(9)struct i2c_client(9)struct i2c_board_info(9)I2C_BOARD_INFO(9)struct i2c_algorithm(9)struct i2c_lock_operations(9)struct i2c_timings(9)struct i2c_bus_recovery_info(9)struct i2c_adapter_quirks(9)i2c_trylock_bus(9)i2c_unlock_bus(9)i2c_mark_adapter_suspended(9)i2c_mark_adapter_resumed(9)i2c_check_quirks(9)module_i2c_driver(9)builtin_i2c_driver(9)
the whole squad, assembled π literally a group chat in ./include/linux/i2c.h, iykyk π
and that's the page, bestie!! no notes, she ate π β¨
sign-off time π this one's from the ./include/linux source, dated October 2026, and it's filed under i2c_lock_bus(9) β mwah, go lock that bus ππ
π¦ 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