STRUCT NMK_I2C_DEV(9)
β¨ 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:
struct i2c_vendor_data(9)struct i2c_nmk_client(9)flush_i2c_fifo(9)disable_all_interrupts(9)clear_all_interrupts(9)init_hw(9)load_i2c_mcr_reg(9)setup_i2c_controller(9)read_i2c(9)write_i2c(9)nmk_i2c_xfer_one(9)nmk_i2c_xfer(9)disable_interrupts(9)i2c_irq_handler(9)
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
- 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