i2c_unlock_bus(9)
π i2c_unlock_bus(9)
okay so bestie, welcome to the Kernel API Manual β yes, that's the manual name, and yes, it's giving "I read the kernel source for fun" energy. we're talking about i2c_unlock_bus today and honestly? she's the calm, responsible friend who hands the keys back after the road trip. iconic behaviour. π«Ά
β¨ NAME β¨
i2c_unlock_bus β release exclusive access to an I2C bus segment π
like, you grabbed the bus, you did your thing, and now you're politely letting go so everyone else can have a turn. manners! we love to see it. πΈ
π¦ SYNOPSIS π¦
void i2c_unlock_bus (struct i2c_adapter *adapter , unsigned int flags );
that's it. that's the whole vibe. returns nothing (it's a void, she doesn't owe you a status code π
), takes an adapter pointer and some flags, done. β¨
π ARGUMENTS π
adapterβ the target I2C bus segment π― like, which bus are we unlocking? that one. this pointer right here.flagsβ okay so this is the "how much am I letting go of" dial, and there are exactly two moves:I2C_LOCK_ROOT_ADAPTERβ unlocks the root i2c adapter π the big one, the main character energy optionI2C_LOCK_SEGMENTβ unlocks only this branch in the adapter tree πΏ just your little corner of the family tree, not the whole thing
pick your fighter wisely, bestie. no cap. π
π§ SEE ALSO π§
okay this list is long but I refuse to leave anyone out, they're all invited to the group chat π
Kernel file ./include/linux/i2c.h β plus these legends:
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_lock_bus(9)i2c_trylock_bus(9)i2c_mark_adapter_suspended(9)i2c_mark_adapter_resumed(9)i2c_check_quirks(9)module_i2c_driver(9)builtin_i2c_driver(9)
go read all of them. or at least the lock/unlock trio. iykyk. π₯
alright that's the whole page, you ate that π β mwah π
sourced from ./include/linux, dated October 2026 β so you know it's fresh off the tree πβ¨
unlock responsibly, bestie ππ
π¦ 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