STRUCT NMK_I2C_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct nmk_i2c_dev(9) ✨

okay bestie, welcome to the Kernel API Manual β€” this one's about struct nmk_i2c_dev, which is literally the private data structure of the controller πŸ’… it's giving "backstage pass to the I2C drama," and honestly? obsessed.


🌸 NAME 🌸

struct nmk_i2c_dev β€” the controller's own lil private data structure, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct nmk_i2c_dev {
    struct i2c_vendor_data          *vendor;
    struct amba_device              *adev;
    struct i2c_adapter              adap;
    int irq;
    void __iomem                    *virtbase;
    struct clk                      *clk;
    struct i2c_nmk_client           cli;
    u32 clk_freq;
    unsigned char                   tft;
    unsigned char                   rft;
    u32 timeout_usecs;
    enum i2c_freq_mode              sm;
    int stop;
    struct wait_queue_head          xfer_wq;
    bool xfer_done;
    int result;
    bool has_32b_bus;
 };

like, that's the whole cast of characters. main character energy all around πŸŽ€


πŸ’– Members πŸ’–

okay, field-by-field tour, bestie β€” no skipping, every single one matters:

  • vendor β€” vendor data for this variant. like, which flavour of this controller we're dealing with πŸ“
  • adev β€” the parent amba device. it's the parent, it's giving authority 😌
  • adap β€” the corresponding I2C adapter. the whole point, honestly.
  • irq β€” interrupt line for the controller. the ✨ interruptions ✨
  • virtbase β€” virtual io memory area. virtual, not fake, don't come for me.
  • clk β€” the hardware i2c block clock. tick tock πŸ•°οΈ
  • cli β€” holder of client specific data. client's lil purse, if you will 🫢
  • clk_freq β€” clock frequency for the operation mode.
  • tft β€” Tx FIFO Threshold in bytes.
  • rft β€” Rx FIFO Threshold in bytes.
  • timeout_usecs β€” Slave response timeout. wait for it… wait for it… πŸ’€
  • sm β€” speed mode.
  • stop β€” stop condition.
  • xfer_wq β€” xfer done wait queue.
  • xfer_done β€” xfer done boolean. true/false era 🌈
  • result β€” controller propogated result. (that's their spelling, not mine, but I'm keeping it verbatim fr fr πŸ™ˆ)
  • has_32b_bus β€” controller is on a bus that only supports 32-bit accesses. yes, only 32-bit. that's the vibe check and it passed πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

everything's in the kernel file ./drivers/i2c/busses/i2c-nomadik.c β€” go read it, it's iconic:


bestie, that's the whole struct. nothing skipped, nothing merged, everything exactly where it lives. iykyk πŸ’œ

and that's a wrap! this one lives in ./drivers/i2c/busses, dated October 2026, and it's filed under struct nmk_i2c_dev(9) β€” mwah, slay, periodt βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from