STRUCT MLXREG_IO_PRIV_DATA(9)
π 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 fieldpdataβ the platform data πhwmonβ the hwmon device πmlxreg_io_attrβ the sysfs attributes array β¨ say it with me: sysfs attributes arraymlxreg_io_dev_attrβ the sysfs sensor device attribute array π that one's a whole mouthful but we respect itgroupβ the sysfs attribute group π¦groupsβ the list of sysfs attribute groups used for hwmon registration, and yeah it'sgroupsplural next togroupsingular, 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 astruct 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
- 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