STRUCT MCP47FEB02_DATA(9)
π struct mcp47feb02_data(9) β chip configuration
okay bestie, welcome to the Kernel API Manual π this one's all about struct mcp47feb02_data, aka the main character struct that holds all the chip config. no cap, this is the whole vibe of the driver in one little bundle. let's get into it β¨
πΈ SYNOPSIS πΈ
struct mcp47feb02_data {
struct mcp47feb02_channel_data chdata[MCP47FEB02_MAX_CH];
struct mutex lock;
const struct mcp47feb02_features *chip_features;
int scale_1[2 * MCP47FEB02_MAX_SCALES_CH];
int scale[2 * MCP47FEB02_MAX_SCALES_CH];
unsigned long active_channels_mask;
struct regmap *regmap;
const char *labels[MCP47FEB02_MAX_CH];
u16 phys_channels;
bool vref1_buffered;
bool vref_buffered;
bool use_vref1;
bool use_vref;
};
like, look at her. iconic. π
π Members π
chdataβ the options that are configured for each channel on the device π¦ every channel gets its own little setup, slay.lockβ a mutex that prevents concurrent reads/writes to the driver's state members π so nobody's out here racing each other, periodt.chip_featuresβ pointer to the features struct β it's giving "know your chip's powers".scale_1β the scales that are set on channels based on Vref1 πΈ specifically the Vref1 girlies.scaleβ the scales that are set on channels based on Vref/Vref0 π the other flavour of scaling, iykyk.active_channels_maskβ the enabled channels π₯ a whole mask of who's actually turned on.regmapβ the regmap for directly accessing the device register π§ lowkey your backstage pass to the hardware.labelsβ a table with channel labels π cute little names for everyone.phys_channelsβ the physical channels on the device π«Ά like, the real ones, fr fr.vref1_bufferedβ the Vref1 buffer is enabled β¨ bool vibes only.vref_bufferedβ the Vref/Vref0 buffer is enabled π again, bool, again valid.use_vref1β the vref1-supply is defined π it's literally set.use_vrefβ the vref-supply is defined π same energy, different supply.
not me listing every single bool like a proud mom π but bestie, the details ARE the point.
π SEE ALSO π
- Kernel file
./drivers/iio/dac/mcp47feb02.cstruct mcp47feb02_features(9)struct mcp47feb02_channel_data(9)
and that's the tea, bestie π go read those companions, they're literally the sequel.
manual: Kernel API Manual Β· source path: ./drivers/iio/dac Β· dated: October 2026 Β· page: struct mcp47feb02_data(9) β mwah, talk later πππ¦
π¦ 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