drivers/iio/dac/mcp47feb02.c
Source file repositories/reference/linux-study-clean/drivers/iio/dac/mcp47feb02.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/iio/dac/mcp47feb02.c- Extension
.c- Size
- 37752 bytes
- Lines
- 1244
- Domain
- Driver Families
- Bucket
- drivers/iio
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/array_size.hlinux/bits.hlinux/bitfield.hlinux/delay.hlinux/err.hlinux/i2c.hlinux/iio/iio.hlinux/iio/sysfs.hlinux/kstrtox.hlinux/module.hlinux/mod_devicetable.hlinux/mutex.hlinux/property.hlinux/regmap.hlinux/regulator/consumer.hlinux/time64.hlinux/types.hlinux/units.h
Detected Declarations
struct mcp47feb02_featuresstruct mcp47feb02_channel_datastruct mcp47feb02_dataenum mcp47feb02_vref_modeenum mcp47feb02_scaleenum mcp47feb02_gain_bit_modefunction mcp47feb02_write_to_eepromfunction store_eeprom_storefunction for_each_set_bitfunction mcp47feb02_suspendfunction for_each_set_bitfunction mcp47feb02_resumefunction for_each_set_bitfunction mcp47feb02_get_powerdown_modefunction mcp47feb02_set_powerdown_modefunction mcp47feb02_read_powerdownfunction mcp47feb02_write_powerdownfunction mcp47feb02_init_scalefunction mcp47feb02_init_scales_availfunction mcp47feb02_read_availfunction mcp47feb02_get_scalefunction mcp47feb02_check_scalefunction mcp47feb02_ch_scalefunction andfunction mcp47feb02_read_rawfunction mcp47feb02_write_rawfunction mcp47feb02_read_labelfunction mcp47feb02_parse_fwfunction device_for_each_child_node_scopedfunction mcp47feb02_init_ctrl_regsfunction mcp47feb02_init_ch_scalesfunction for_each_set_bitfunction mcp47feb02_probe
Annotated Snippet
struct mcp47feb02_features {
const char *name;
unsigned int phys_channels;
unsigned int resolution;
bool have_ext_vref1;
bool have_eeprom;
};
static const struct mcp47feb02_features mcp47feb01_chip_features = {
.name = "mcp47feb01",
.phys_channels = 1,
.resolution = 8,
.have_ext_vref1 = false,
.have_eeprom = true,
};
static const struct mcp47feb02_features mcp47feb02_chip_features = {
.name = "mcp47feb02",
.phys_channels = 2,
.resolution = 8,
.have_ext_vref1 = false,
.have_eeprom = true,
};
static const struct mcp47feb02_features mcp47feb04_chip_features = {
.name = "mcp47feb04",
.phys_channels = 4,
.resolution = 8,
.have_ext_vref1 = true,
.have_eeprom = true,
};
static const struct mcp47feb02_features mcp47feb08_chip_features = {
.name = "mcp47feb08",
.phys_channels = 8,
.resolution = 8,
.have_ext_vref1 = true,
.have_eeprom = true,
};
static const struct mcp47feb02_features mcp47feb11_chip_features = {
.name = "mcp47feb11",
.phys_channels = 1,
.resolution = 10,
.have_ext_vref1 = false,
.have_eeprom = true,
};
static const struct mcp47feb02_features mcp47feb12_chip_features = {
.name = "mcp47feb12",
.phys_channels = 2,
.resolution = 10,
.have_ext_vref1 = false,
.have_eeprom = true,
};
static const struct mcp47feb02_features mcp47feb14_chip_features = {
.name = "mcp47feb14",
.phys_channels = 4,
.resolution = 10,
.have_ext_vref1 = true,
.have_eeprom = true,
};
static const struct mcp47feb02_features mcp47feb18_chip_features = {
.name = "mcp47feb18",
.phys_channels = 8,
.resolution = 10,
.have_ext_vref1 = true,
.have_eeprom = true,
};
static const struct mcp47feb02_features mcp47feb21_chip_features = {
.name = "mcp47feb21",
.phys_channels = 1,
.resolution = 12,
.have_ext_vref1 = false,
.have_eeprom = true,
};
static const struct mcp47feb02_features mcp47feb22_chip_features = {
.name = "mcp47feb22",
.phys_channels = 2,
.resolution = 12,
.have_ext_vref1 = false,
.have_eeprom = true,
};
static const struct mcp47feb02_features mcp47feb24_chip_features = {
.name = "mcp47feb24",
Annotation
- Immediate include surface: `linux/array_size.h`, `linux/bits.h`, `linux/bitfield.h`, `linux/delay.h`, `linux/err.h`, `linux/i2c.h`, `linux/iio/iio.h`, `linux/iio/sysfs.h`.
- Detected declarations: `struct mcp47feb02_features`, `struct mcp47feb02_channel_data`, `struct mcp47feb02_data`, `enum mcp47feb02_vref_mode`, `enum mcp47feb02_scale`, `enum mcp47feb02_gain_bit_mode`, `function mcp47feb02_write_to_eeprom`, `function store_eeprom_store`, `function for_each_set_bit`, `function mcp47feb02_suspend`.
- Atlas domain: Driver Families / drivers/iio.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.