STRUCT MCP9982_PRIV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct mcp9982_priv(9) β€” like, the whole vibe of a chip's parameters ✨

okay bestie, so this is a page out of the Kernel API Manual, and it's literally all about struct mcp9982_priv β€” the little struct that holds information about chip parameters. that's the whole NAME situation, no cap 🫢


✨ SYNOPSIS ✨

here's the moment you've all been waiting for, the struct in all her main character glory πŸ‘‘

struct mcp9982_priv {
    struct regmap *regmap;
    const struct mcp9982_features *chip;
    const char *labels[MCP9982_MAX_NUM_CHANNELS];
    unsigned int interval_idx;
    unsigned long enabled_channel_mask;
    u8 num_channels;
    bool recd34_enable;
    bool recd12_enable;
    bool apdd_enable;
    bool run_state;
 };

copy it exactly, don't be out here free-styling, she's built like that for a reason 🧚


🌸 Members 🌸

okay so now we go member by member, and honestly? every single one of them is iconic in her own way:

  • regmap β€” the device register map πŸ’– like, the map of the registers, that's it, that's the vibe
  • chip β€” a pointer to the structure that's holding the chip features ✨ so the chip's whole personality lives in there
  • labels β€” the labels of the channels πŸŽ€ every channel gets her little name tag
  • interval_idx β€” the index that represents the current update interval ⏱️ like which interval we're on right now, bestie
  • enabled_channel_mask β€” a mask containing which channels should be enabled πŸ”₯ a whole mask of who gets to be on
  • num_channels β€” the number of active physical channels πŸ¦‹ just a count, but make it real
  • recd34_enable β€” the state of Resistance Error Correction(REC) on channels 3 and 4 πŸ’œ yes the capital-R capital-E capital-C, treat her with respect
  • recd12_enable β€” the state of Resistance Error Correction(REC) on channels 1 and 2 πŸ’… same energy, different channels, we stay consistent
  • apdd_enable β€” the state of anti-parallel diode mode 🌈 say it with me: anti-parallel diode mode
  • run_state β€” the chip is in Run state, otherwise it's in Standby state 😴 so like, she's either running or she's chilling, there is no third option fr fr

πŸ‘€ SEE ALSO πŸ‘€

go read these next, i'm obsessed:

  • Kernel file ./drivers/hwmon/mcp9982.c
  • struct mcp9982_features(9)

πŸ’€ reminder bestie: this is the kernel API, so keep those names and types exactly as written β€” no renaming, no "fixing", the compiler does not care about your aesthetic πŸ™ˆ

⭐ and that's the page!! this little gem came from ./drivers/hwmon, dated October 2026, so yeah, she's got the source and the date stamped right on her β€” periodt πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from