ENUM HWMON_TYPE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


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