STRUCT STM32F7_I2C_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 controller
  • base β€” virtual memory area
  • complete β€” completion of I2C message (the "we're done here" moment ✨)
  • clk β€” hw i2c clock
  • bus_rate β€” I2C clock frequency of the controller
  • msg β€” Pointer to data to be written
  • msg_num β€” number of I2C messages to be executed
  • msg_id β€” message identifiant (yes, that's spelled that way in the original, i'm not touching it πŸ™ˆ)
  • f7_msg β€” customized i2c msg for driver usage
  • setup β€” I2C timing input setup
  • timing β€” I2C computed timings
  • slave β€” list of slave devices registered on the I2C bus
  • slave_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 device
  • master_mode β€” boolean to know in which mode the I2C is running (master or slave)
  • dma β€” dma data
  • use_dma β€” boolean to know if dma is used in the current transfer
  • regmap β€” holds SYSCFG phandle for Fast Mode Plus bits
  • fmp_sreg β€” register address for setting Fast Mode Plus bits
  • fmp_creg β€” register address for clearing Fast Mode Plus bits
  • fmp_mask β€” mask for Fast Mode Plus bits in set register
  • wakeup_src β€” boolean to know if the device is a wakeup source ⏰
  • smbus_mode β€” states that the controller is configured in SMBus mode
  • host_notify_client β€” SMBus host-notify client
  • analog_filter β€” boolean to indicate enabling of the analog filter
  • dnf_dt β€” value of digital filter requested via dt
  • dnf β€” value of digital filter to apply
  • alert β€” 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