STRUCT MLXREG_IO_PRIV_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

struct mlxreg_io_priv_data β€” the driver's very own private data, bestie πŸ’… no cap, this is literally where the driver keeps its stuff

So real quick β€” this page lives in the Kernel API Manual, section 9, and it's all about one lil struct. Let's get into it 🫢


✨ SYNOPSIS ✨

struct mlxreg_io_priv_data {
    struct platform_device *pdev;
    struct mlxreg_core_platform_data *pdata;
    struct device *hwmon;
    struct attribute *mlxreg_io_attr[MLXREG_IO_ATT_NUM + 1];
    struct sensor_device_attribute mlxreg_io_dev_attr[MLXREG_IO_ATT_NUM];
    struct attribute_group group;
    const struct attribute_group *groups[2];
    int regsize;
    struct mutex io_lock;
 };

That's the whole struct, served fresh 🌸 keep it exactly as-is, okay? Every member, every bracket, every + 1 matters πŸ‘‘


🌈 Members 🌈

Ok so these are the fields, and yes we're doing all of them because none of them are boring:

  • pdev β€” the platform device 🧚 that's it, that's the field
  • pdata β€” the platform data πŸ“
  • hwmon β€” the hwmon device πŸ’–
  • mlxreg_io_attr β€” the sysfs attributes array ✨ say it with me: sysfs attributes array
  • mlxreg_io_dev_attr β€” the sysfs sensor device attribute array πŸ‘‘ that one's a whole mouthful but we respect it
  • group β€” the sysfs attribute group πŸ¦‹
  • groups β€” the list of sysfs attribute groups used for hwmon registration, and yeah it's groups plural next to group singular, that's just how it is, don't come for me πŸ’€
  • regsize β€” the size of a register value ⭐
  • io_lock β€” user access locking πŸ”₯ this is a struct mutex, so like… mutual exclusion, respect the lock fr fr

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/platform/mellanox/mlxreg-io.c β€” like, literally go read it, iykyk πŸ’œ

aaaand that's the page!! πŸŽ€ ok so the source is ./drivers/platform/mellanox, the date on this one is October 2026, and the whole thing is struct mlxreg_io_priv_data(9) β€” section 9, Kernel API Manual, iconic behavior only πŸ’…βœ¨ 🌸

πŸ“¦ where this page comes from