STRUCT STM32F7_I2C_DEV(9)
π struct stm32f7_i2c_dev(9) β the Kernel API Manual, bestie edition π
okay so picture this: you're digging around in the Kernel API Manual (that's the manual name, don't @ me) and you bump into struct stm32f7_i2c_dev β literally the private data of the controller. it's giving backstage pass energy. every field in here is a little piece of the I2C controller's whole personality, and we're gonna meet all of them, no skipping, fr fr π
β¨ NAME β¨
struct stm32f7_i2c_dev β private data of the controller π«Ά
πΈ SYNOPSIS πΈ
struct stm32f7_i2c_dev {
struct i2c_adapter adap;
struct device *dev;
void __iomem *base;
struct completion complete;
struct clk *clk;
unsigned int bus_rate;
struct i2c_msg *msg;
unsigned int msg_num;
unsigned int msg_id;
struct stm32f7_i2c_msg f7_msg;
struct stm32f7_i2c_setup setup;
struct stm32f7_i2c_timings timing;
struct i2c_client *slave[STM32F7_I2C_MAX_SLAVE];
struct i2c_client *slave_running;
struct stm32f7_i2c_regs backup_regs;
u32 slave_dir;
bool master_mode;
struct stm32_i2c_dma *dma;
bool use_dma;
struct regmap *regmap;
u32 fmp_sreg;
u32 fmp_creg;
u32 fmp_mask;
bool wakeup_src;
bool smbus_mode;
struct i2c_client *host_notify_client;
bool analog_filter;
u32 dnf_dt;
u32 dnf;
struct stm32f7_i2c_alert *alert;
bool atomic;
};
look at that struct. 30 fields. main character energy, honestly π copy it exactly, every semicolon is sacred π€
π¦ Members π¦
okay bestie, field-by-field tour, no cap:
adapβ I2C adapter for this controller π«devβ device for this controllerbaseβ virtual memory areacompleteβ completion of I2C message (the "we're done here" moment β¨)clkβ hw i2c clockbus_rateβ I2C clock frequency of the controllermsgβ Pointer to data to be writtenmsg_numβ number of I2C messages to be executedmsg_idβ message identifiant (yes, that's spelled that way in the original, i'm not touching it π)f7_msgβ customized i2c msg for driver usagesetupβ I2C timing input setuptimingβ I2C computed timingsslaveβ list of slave devices registered on the I2C busslave_runningβ slave device currently used (the one on aux rn π§)backup_regsβ backup of i2c controller registers (for suspend/resume)slave_dirβ transfer direction for the current slave devicemaster_modeβ boolean to know in which mode the I2C is running (master or slave)dmaβ dma datause_dmaβ boolean to know if dma is used in the current transferregmapβ holds SYSCFG phandle for Fast Mode Plus bitsfmp_sregβ register address for setting Fast Mode Plus bitsfmp_cregβ register address for clearing Fast Mode Plus bitsfmp_maskβ mask for Fast Mode Plus bits in set registerwakeup_srcβ boolean to know if the device is a wakeup source β°smbus_modeβ states that the controller is configured in SMBus modehost_notify_clientβ SMBus host-notify clientanalog_filterβ boolean to indicate enabling of the analog filterdnf_dtβ value of digital filter requested via dtdnfβ value of digital filter to applyalertβ SMBus alert specific data π¨atomicβ boolean indicating that current transfer is atomic
π SEE ALSO π
go read the kernel file ./drivers/i2c/busses/i2c-stm32f7.c struct, plus these iconic siblings:
struct stm32f7_i2c_regs(9)struct stm32f7_i2c_spec(9)struct stm32f7_i2c_setup(9)struct stm32f7_i2c_timings(9)struct stm32f7_i2c_msg(9)struct stm32f7_i2c_alert(9)
lowkey a whole family reunion in the i2c-stm32f7 driver π read them all, iykyk
and that's the page bestie, you ate that π
β¨ sign-off time: this one lives in ./drivers/i2c/busses, dated October 2026, and it's titled struct stm32f7_i2c_dev(9). 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