STRUCT I2C_LOCK_OPERATIONS(9)
π struct i2c_lock_operations(9) β like, the I2C locking ops page, bestie
okay so this is a page from the Kernel API Manual, and it's literally about struct i2c_lock_operations β the little struct that represents I2C locking operations. yes queen, locking. we love a mutually-exclusive moment. πβ¨
πΈ NAME
struct i2c_lock_operations β represent I2C locking operations
like, it is the representation. it's giving "the vibe of locking, formalized in a struct." no cap.
β¨ SYNOPSIS
struct i2c_lock_operations {
void (*lock_bus)(struct i2c_adapter *adapter, unsigned int flags);
int (*trylock_bus)(struct i2c_adapter *adapter, unsigned int flags);
void (*unlock_bus)(struct i2c_adapter *adapter, unsigned int flags);
};
three function pointers, all with the same (struct i2c_adapter *adapter, unsigned int flags) energy. iconic symmetry tbh. π«Ά
π Members
lock_busβ Get exclusive access to an I2C bus segment. it's the "mine now, back off" one. π₯trylock_busβ Try to get exclusive access to an I2C bus segment. note the try β it's the polite version, the "if you're freeβ¦? no? okay bestie, no worries" one. πunlock_busβ Release exclusive access to an I2C bus segment. the letting-go arc. we stan a clean release. π¦
π Description
The main operations are wrapped by i2c_lock_bus and i2c_unlock_bus.
that's it, that's the description. short, sweet, main character energy. you don't go poking at these function pointers directly β the wrappers are the ones doing the actual handling, iykyk. β
π SEE ALSO
so many friends, fr fr. all of these live in the kernel file ./include/linux/i2c.h:
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_timings(9)struct i2c_bus_recovery_info(9)struct i2c_adapter_quirks(9)i2c_lock_bus(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)
go read them, bestie. collect them all like PokΓ©mon cards. π
reminder: this page lives under ./include/linux β that's the source, don't come for me.
okay that's the whole thing!! π sourced from ./include/linux, dated October 2026, and it's still struct i2c_lock_operations(9) β mwah, 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