STRUCT I2C_ADAPTER_QUIRKS(9)
πΈ NAME πΈ
struct i2c_adapter_quirks β describe flaws of an i2c adapter. From the Kernel API Manual, bestie, and yes, this is the little struct that spills the tea on an adapterβs quirky limits. π
β¨ SYNOPSIS β¨
struct i2c_adapter_quirks {
u64 flags;
int max_num_msgs;
u16 max_write_len;
u16 max_read_len;
u16 max_comb_1st_msg_len;
u16 max_comb_2nd_msg_len;
};
π«Ά Members π«Ά
flagsβ seeI2C_AQ_*for possible flags, and read below for the full story. β¨max_num_msgsβ maximum number of messages per transfer. Thatβs the cap, no cap. πmax_write_lenβ maximum length of a write message. Keep it cute and within bounds. πmax_read_lenβ maximum length of a read message. Same energy, different direction. π¦max_comb_1st_msg_lenβ maximum length of the first msg in a combined message. Yes, βmsgβ is the word here. πΈmax_comb_2nd_msg_lenβ maximum length of the second msg in a combined message. The sequel has limits too. π
π₯ Description π₯
Okay so, the note about combined messages: some I2C controllers can only send one message per transfer, plus something called combined message or write-then-read. This is (usually) a small write message followed by a read message and barely enough to access register based devices like EEPROMs. There is a flag to support this mode. It implies max_num_msg = 2 and does the length checks with max_comb_*_len because combined message mode usually has its own limitations. Because of HW implementations, some controllers can actually do write-then-anything or other variants. To support that, write-then-read has been broken out into smaller bits like write-first and read-second which can be combined as needed. π§
π SEE ALSO π
Kernel file ./include/linux/i2c.hi2c_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)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)
Bye bestie! π Source/version/date tea: ./include/linux, dated October 2026, and the page is struct i2c_adapter_quirks(9). π π
π¦ 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