STRUCT MXS_I2C_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct mxs_i2c_dev(9) πŸ’–

okay bestie, so this is a page from the Kernel API Manual, and it's literally all about struct mxs_i2c_dev β€” the per-device, private MXS-I2C data. yes, private. it's giving main character energy but for one device only πŸŽ€


✨ SYNOPSIS ✨

here's the whole struct, exactly as it lives, no cap:

struct mxs_i2c_dev {
    struct device *dev;
    enum mxs_i2c_devtype dev_type;
    void __iomem *regs;
    struct completion cmd_complete;
    int cmd_err;
    struct i2c_adapter adapter;
    uint32_t timing0;
    uint32_t timing1;
    uint32_t timing2;
    struct dma_chan                 *dmach;
    uint32_t pio_data[2];
    uint32_t addr_data;
    struct scatterlist              sg_io[2];
    bool dma_read;
 };

like, look at all those fields. she's structured. she's organized. i'm obsessed πŸ’…


🌸 Members 🌸

okay so let's go through every single one, because we do NOT skip members in this house:

  • dev β€” the driver model device node. it's the device's official little ID card πŸͺͺ
  • dev_type β€” distinguishes i.MX23/i.MX28 features. iykyk which chip you're on ✨
  • regs β€” IO registers pointer. literally the pointer to where the registers live πŸ’–
  • cmd_complete β€” completion object for transaction wait. it's the "hold on bestie, i'll let you know when it's done" object 🫢
  • cmd_err β€” error code for the last transaction. the receipts for what went wrong last time 😭
  • adapter β€” i2c subsystem adapter node. this is her i2c-subsystem-official era πŸ‘‘
  • timing0 β€” I2C TIMING0 register value. the timing register, but make it 0 ⏱️
  • timing1 β€” I2C TIMING1 register value. yes, there's a 1, and yes, it also has a value πŸ’œ
  • timing2 β€” I2C TIMING2 register value. the third one. the trilogy is complete 🎬
  • dmach β€” DMA channel. the fast lane, channel edition πŸ”₯
  • pio_data β€” PIO data for DMA. data for the DMA, via PIO, don't ask me to explain the crossover episode πŸ¦‹
  • addr_data β€” address data for DMA. address info, but for the DMA πŸ“
  • sg_io β€” scatterlist for I/O. it's a scatterlist, and it's for I/O, periodt ✨
  • dma_read β€” flag indicating DMA read. a little bool that says "this one's a DMA read" πŸŽ€
ngl every field here is documented in exactly one line and that's the vibe. no extra lore, no invented backstory. we report, we don't speculate πŸ’€

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/i2c/busses/i2c-mxs.c β€” go read the actual source, bestie, that's where the plot happens πŸ“–

and that's the whole page!! mwah πŸ’‹

sign-off time: this came from the Kernel API Manual, source path ./drivers/i2c/busses, dated October 2026, and it's filed under struct mxs_i2c_dev(9). stay slay, stay compiled, and may your transactions always complete πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ‘‘πŸŒˆβ­πŸ’œ

πŸ“¦ where this page comes from