i2c_dev_set_master_data(9)
π i2c_dev_set_master_data β Kernel API Manual, bestie β¨
Okay so real talk, this page lives in the Kernel API Manual and it's literally about gluing your own private data onto an I2C device descriptor. Tiny function, huge "my controller, my rules" energy. Let's get into it π«Ά
πΈ NAME
i2c_dev_set_master_data β attach master private data to an I2C device descriptor β¨
π¦ SYNOPSIS
void i2c_dev_set_master_data (struct i2c_dev_desc *dev , void *data );
π ARGUMENTS
devβ the I2C device descriptor you're attaching private data to π (yes, that's the whole point, she's the main character here)dataβ the private data itself. it's avoid *, so likeβ¦ it's whatever you want it to be. no cap π₯
π DESCRIPTION
So this function lets a master controller attach per-device private data to a device, and later you can get it back with i2c_device_get_master_data. That's it. That's the whole vibe β stash it now, retrieve it later, iconic behaviour honestly π
lowkey the most useful pattern ever: drop your data in at one end, pull it back out at the other. no globals, no drama, no stress π§
β SEE ALSO
Bestie the cross-reference list here is long, but every single one of these is a real destination, so let's give them all their moment π
- Kernel file
./include/linux/i3c/master.h struct i3c_i2c_dev_desc(9)struct i2c_dev_boardinfo(9)struct i2c_dev_desc(9)struct i3c_ibi_slot(9)struct i3c_device_ibi_info(9)struct i3c_dev_boardinfo(9)struct i3c_dev_desc(9)struct i3c_device(9)enum i3c_bus_mode(9)enum i3c_open_drain_speed(9)enum i3c_addr_slot_status(9)struct i3c_bus(9)struct i3c_master_controller_ops(9)struct i3c_master_controller(9)i3c_bus_for_each_i2cdev(9)i3c_bus_for_each_i3cdev(9)struct i3c_dma(9)i3c_dev_get_master_data(9)i3c_dev_set_master_data(9)i2c_dev_get_master_data(9)i3c_dev_get_master(9)i2c_dev_get_master(9)i3c_master_get_bus(9)
kay that's the page!! it ships out of ./include/linux/i3c, dated October 2026 β so yeah, from the future, slay πβ¨ go attach some private data, bestie, and remember: i2c_dev_get_master_data(9) is waiting on the other side to give it back π«Άπ
π¦ 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