STRUCT MLXSW_I2C(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

struct mlxsw_i2c β€” device private data:

okay so this page is from the Kernel API Manual, and this struct is literally the device's private-data situation. no cap, it's giving β€œeverything the driver needs in one cozy little bag” πŸ’…βœ¨

✨ SYNOPSIS ✨

the whole struct, exactly as it shows up, bestie:

       struct mlxsw_i2c {
           struct {
             u32 mb_size_in;
             u32 mb_off_in;
             u32 mb_size_out;
             u32 mb_off_out;
             struct mutex lock;
           } cmd;
           struct device *dev;
           struct mlxsw_core *core;
           struct mlxsw_bus_info bus_info;
           u16 block_size;
           struct mlxreg_core_hotplug_platform_data *pdata;
           struct work_struct irq_work;
           int irq;
        };

🌸 Members 🌸

vibe check on every single field β€” nothing skipped, fr fr:

  • cmd β€” command attributes;
    • cmd.mb_size_in β€” input mailbox size;
    • cmd.mb_off_in β€” input mailbox offset in register space;
    • cmd.mb_size_out β€” output mailbox size;
    • cmd.mb_off_out β€” output mailbox offset in register space;
    • cmd.lock β€” command execution lock;
  • dev β€” I2C device;
  • core β€” switch core pointer;
  • bus_info β€” bus info block;
  • block_size β€” maximum block size allowed to pass to under layer;
  • pdata β€” device platform data;
  • irq_work β€” interrupts work item;
  • irq β€” IRQ line number;

πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./drivers/net/ethernet/mellanox/mlxsw/i2c.c β€” that's the source file, iykyk πŸ¦‹

mwah πŸ’‹ β€” source/version: ./drivers/net/ethernet/mellano... Β· date: October 2026 Β· manual: Kernel API Manual Β· page: struct mlxsw_i2c(9) β€” bye bestie! 🌈🫢

πŸ“¦ where this page comes from