drivers/hwmon/pmbus/lm25066.c
Source file repositories/reference/linux-study-clean/drivers/hwmon/pmbus/lm25066.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwmon/pmbus/lm25066.c- Extension
.c- Size
- 13901 bytes
- Lines
- 575
- 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/bitops.hlinux/kernel.hlinux/module.hlinux/init.hlinux/err.hlinux/slab.hlinux/i2c.hlinux/log2.hlinux/of.hpmbus.h
Detected Declarations
struct __coeffstruct lm25066_dataenum chipsfunction lm25066_read_word_datafunction lm25056_read_word_datafunction lm25056_read_byte_datafunction lm25066_write_word_datafunction lm25066_probe
Annotated Snippet
struct __coeff {
short m, b, R;
};
#define PSC_CURRENT_IN_L (PSC_NUM_CLASSES)
#define PSC_POWER_L (PSC_NUM_CLASSES + 1)
static const struct __coeff lm25066_coeff[][PSC_NUM_CLASSES + 2] = {
[lm25056] = {
[PSC_VOLTAGE_IN] = {
.m = 16296,
.b = 1343,
.R = -2,
},
[PSC_CURRENT_IN] = {
.m = 13797,
.b = -1833,
.R = -2,
},
[PSC_CURRENT_IN_L] = {
.m = 6726,
.b = -537,
.R = -2,
},
[PSC_POWER] = {
.m = 5501,
.b = -2908,
.R = -3,
},
[PSC_POWER_L] = {
.m = 26882,
.b = -5646,
.R = -4,
},
[PSC_TEMPERATURE] = {
.m = 1580,
.b = -14500,
.R = -2,
},
},
[lm25066] = {
[PSC_VOLTAGE_IN] = {
.m = 22070,
.b = -1800,
.R = -2,
},
[PSC_VOLTAGE_OUT] = {
.m = 22070,
.b = -1800,
.R = -2,
},
[PSC_CURRENT_IN] = {
.m = 13661,
.b = -5200,
.R = -2,
},
[PSC_CURRENT_IN_L] = {
.m = 6854,
.b = -3100,
.R = -2,
},
[PSC_POWER] = {
.m = 736,
.b = -3300,
.R = -2,
},
[PSC_POWER_L] = {
.m = 369,
.b = -1900,
.R = -2,
},
[PSC_TEMPERATURE] = {
.m = 16,
},
},
[lm5064] = {
[PSC_VOLTAGE_IN] = {
.m = 4611,
.b = -642,
.R = -2,
},
[PSC_VOLTAGE_OUT] = {
.m = 4621,
.b = 423,
.R = -2,
},
[PSC_CURRENT_IN] = {
.m = 5456,
.b = 2118,
.R = -2,
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/kernel.h`, `linux/module.h`, `linux/init.h`, `linux/err.h`, `linux/slab.h`, `linux/i2c.h`, `linux/log2.h`.
- Detected declarations: `struct __coeff`, `struct lm25066_data`, `enum chips`, `function lm25066_read_word_data`, `function lm25056_read_word_data`, `function lm25056_read_byte_data`, `function lm25066_write_word_data`, `function lm25066_probe`.
- 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.