hwmon_devic...er_with_info(9)
β¨ hwmon_device_register_with_info β¨
okay so bestie, we're in the Kernel API Manual for the hwmon_devic...er_with_info(9) page, and this one is literally the glow-up function for hwmon drivers π
buckle up π
πΈ NAME πΈ
hwmon_device_register_with_info β register w/ hwmon π¦
π SYNOPSIS π
struct device * hwmon_device_register_with_info (struct device *dev ,
const char *name , void *drvdata , const struct hwmon_chip_info *chip ,
const struct attribute_group **extra_groups );
like, that's the whole signature, no cap π₯
π ARGUMENTS π
devβ the parent device π mandatory, you literally cannot skip it, she's the main character energy herenameβ the hwmon name attribute β¨ also mandatory, so don't come to the function empty-handeddrvdataβ driver data to attach to the created device π«Ά optional, you can slide that in if you wantchipβ pointer tohwmon_chip_infoπ mandatory, the whole vibe check depends on itextra_groupsβ pointer to list of additional non-standard attribute groups π optional, for when you want extra toppings on your device
π¦ DESCRIPTION π¦
okay so listen π when the device is no longer needed, hwmon_device_unregister must be called. yes, must, fr fr β don't leave her hanging π
and the function? it returns the pointer to the new device π« iconic behaviour, honestly πΈ
π SEE ALSO π
- Kernel file
./drivers/hwmon/hwmon.cπ (go read it, iykyk) hwmon_device_register_with_groups(9)hwmon_device_register_for_thermal(9)hwmon_device_register(9)hwmon_device_unregister(9)devm_hwmon_device_register_with_groups(9)devm_hwmon_device_register_with_info(9)hwmon_sanitize_name(9)devm_hwmon_sanitize_name(9)
like a whole friend group of functions, they all ate π₯π
π§ tiny reminder bestie: every single flag, argument, and reference above is exactly as it appears in the original β i kept it all for you, no details dropped, periodt π
and that's the page! πΈ this one lives in ./drivers/hwmon and it's dated October 2026 π
β so like, future vibes only, slay ππ¦π
π¦ 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