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.

Dependency Surface

Detected Declarations

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

Implementation Notes