drivers/hwmon/mcp9982.c
Source file repositories/reference/linux-study-clean/drivers/hwmon/mcp9982.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwmon/mcp9982.c- Extension
.c- Size
- 29752 bytes
- Lines
- 1014
- Domain
- Driver Families
- Bucket
- drivers/hwmon
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/array_size.hlinux/bitfield.hlinux/bitops.hlinux/bits.hlinux/byteorder/generic.hlinux/delay.hlinux/device/devres.hlinux/device.hlinux/dev_printk.hlinux/err.hlinux/hwmon.hlinux/i2c.hlinux/math.hlinux/minmax.hlinux/property.hlinux/regmap.hlinux/time64.hlinux/util_macros.h
Detected Declarations
struct mcp9982_featuresstruct mcp9982_privfunction mcp9982_is_volatile_regfunction mcp9982_read_limitfunction mcp9982_readfunction mcp9982_read_labelfunction mcp9982_write_limitfunction mcp9982_write_hystfunction mcp9982_writefunction mcp9982_is_visiblefunction mcp9982_initfunction mcp9982_parse_fw_configfunction mcp9982_probe
Annotated Snippet
struct mcp9982_features {
const char *name;
u8 phys_channels;
bool hw_thermal_shutdown;
bool allow_apdd;
bool has_recd34;
};
static const struct mcp9982_features mcp9933_chip_config = {
.name = "mcp9933",
.phys_channels = 3,
.hw_thermal_shutdown = false,
.allow_apdd = true,
.has_recd34 = false,
};
static const struct mcp9982_features mcp9933d_chip_config = {
.name = "mcp9933d",
.phys_channels = 3,
.hw_thermal_shutdown = true,
.allow_apdd = true,
.has_recd34 = false,
};
static const struct mcp9982_features mcp9982_chip_config = {
.name = "mcp9982",
.phys_channels = 2,
.hw_thermal_shutdown = false,
.allow_apdd = false,
.has_recd34 = false,
};
static const struct mcp9982_features mcp9982d_chip_config = {
.name = "mcp9982d",
.phys_channels = 2,
.hw_thermal_shutdown = true,
.allow_apdd = false,
.has_recd34 = false,
};
static const struct mcp9982_features mcp9983_chip_config = {
.name = "mcp9983",
.phys_channels = 3,
.hw_thermal_shutdown = false,
.allow_apdd = false,
.has_recd34 = true,
};
static const struct mcp9982_features mcp9983d_chip_config = {
.name = "mcp9983d",
.phys_channels = 3,
.hw_thermal_shutdown = true,
.allow_apdd = false,
.has_recd34 = true,
};
static const struct mcp9982_features mcp9984_chip_config = {
.name = "mcp9984",
.phys_channels = 4,
.hw_thermal_shutdown = false,
.allow_apdd = true,
.has_recd34 = true,
};
static const struct mcp9982_features mcp9984d_chip_config = {
.name = "mcp9984d",
.phys_channels = 4,
.hw_thermal_shutdown = true,
.allow_apdd = true,
.has_recd34 = true,
};
static const struct mcp9982_features mcp9985_chip_config = {
.name = "mcp9985",
.phys_channels = 5,
.hw_thermal_shutdown = false,
.allow_apdd = true,
.has_recd34 = true,
};
static const struct mcp9982_features mcp9985d_chip_config = {
.name = "mcp9985d",
.phys_channels = 5,
.hw_thermal_shutdown = true,
.allow_apdd = true,
.has_recd34 = true,
};
static const unsigned int mcp9982_update_interval[11] = {
16000, 8000, 4000, 2000, 1000, 500, 250, 125, 64, 32, 16
Annotation
- Immediate include surface: `linux/array_size.h`, `linux/bitfield.h`, `linux/bitops.h`, `linux/bits.h`, `linux/byteorder/generic.h`, `linux/delay.h`, `linux/device/devres.h`, `linux/device.h`.
- Detected declarations: `struct mcp9982_features`, `struct mcp9982_priv`, `function mcp9982_is_volatile_reg`, `function mcp9982_read_limit`, `function mcp9982_read`, `function mcp9982_read_label`, `function mcp9982_write_limit`, `function mcp9982_write_hyst`, `function mcp9982_write`, `function mcp9982_is_visible`.
- Atlas domain: Driver Families / drivers/hwmon.
- 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.