ENUM HWMON_TYPE(9)
π enum hwmon_type(9)
okay so welcome to the Kernel API Manual bestie, we're doing an enum today and honestly it's giving "list of vibes" π¦
β¨ NAME β¨
enum hwmon_type β yeah so the original page literally has no description here, not a single word. iconic of it, honestly. π so like... an enum, named hwmon_type, and that's the whole story. it does not elaborate. periodt.
πΈ SYNOPSIS πΈ
okay so here's the whole thing laid out, every single constant, exactly as written, no cap:
enum hwmon_type {
HWMON_TYPE_NONE ,
HWMON_TYPE_CPU ,
HWMON_TYPE_CURR ,
HWMON_TYPE_ENERGY ,
HWMON_TYPE_FAN ,
HWMON_TYPE_HUMIDITY ,
HWMON_TYPE_IN ,
HWMON_TYPE_INTRUSION ,
HWMON_TYPE_POWER ,
HWMON_TYPE_PWM ,
HWMON_TYPE_TEMP ,
HWMON_TYPE_MAX
};
π Constants π
so the source doc is very much "no thoughts, head empty" on these, and I'm not about to make stuff up, so here's the honest truth β every one of these is marked -- undescribed --. yes, literally all twelve. we love a mysterious queen π
HWMON_TYPE_NONEβ-- undescribed --HWMON_TYPE_CPUβ-- undescribed --HWMON_TYPE_CURRβ-- undescribed --HWMON_TYPE_ENERGYβ-- undescribed --HWMON_TYPE_FANβ-- undescribed --HWMON_TYPE_HUMIDITYβ-- undescribed --HWMON_TYPE_INβ-- undescribed --HWMON_TYPE_INTRUSIONβ-- undescribed --HWMON_TYPE_POWERβ-- undescribed --HWMON_TYPE_PWMβ-- undescribed --HWMON_TYPE_TEMPβ-- undescribed --HWMON_TYPE_MAXβ-- undescribed --
heads up bestie: that's not me being lazy, that's genuinely what's written. all twelve are undescribed in the source. don't come for me π
π Description π
okay here's the actual tea, and it's good tea β
As described in Documentation/hwmon/sysfs-interface.rst, hwmon events are defined over multiple files of the form <type><num>_<item>. This enum captures potential <type> values. π«Ά
so like β the filename pattern is literally <type><num>_<item>, and this enum is the <type> part of that equation. the whole squad of possible type values, collected in one place. ate. π
also, this enum is exposed for testing. yes, it's a whole testing situation. iykyk π
π₯ SEE ALSO π₯
go look at these, they're all right there in the kernel file ./tools/perf/util/hwmon_pmu.h, and honestly they're all main characters:
enum hwmon_item(9)union hwmon_pmu_event_key(9)parse_hwmon_filename(9)hwmon_pmu__new(9)
fr fr though: none of these are optional reading if you're deep in the hwmon perf util situation. go read them. i'll wait. π§
and that's the page!! π shoutout to ./tools/perf/util for bringing us this absolute bop, dated October 2026, from the Kernel API Manual obviously. mwah π slay, go read some sysfs docs, drink water, ily πβ
π¦ 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