STRUCT MCP9982_PRIV(9)
π 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 vibechipβ a pointer to the structure that's holding the chip features β¨ so the chip's whole personality lives in therelabelsβ the labels of the channels π every channel gets her little name taginterval_idxβ the index that represents the current update interval β±οΈ like which interval we're on right now, bestieenabled_channel_maskβ a mask containing which channels should be enabled π₯ a whole mask of who gets to be onnum_channelsβ the number of active physical channels π¦ just a count, but make it realrecd34_enableβ the state of Resistance Error Correction(REC) on channels 3 and 4 π yes the capital-R capital-E capital-C, treat her with respectrecd12_enableβ the state of Resistance Error Correction(REC) on channels 1 and 2 π same energy, different channels, we stay consistentapdd_enableβ the state of anti-parallel diode mode π say it with me: anti-parallel diode moderun_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
- 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