drivers/platform/x86/asus-armoury.h

Source file repositories/reference/linux-study-clean/drivers/platform/x86/asus-armoury.h

File Facts

System
Linux kernel
Corpus path
drivers/platform/x86/asus-armoury.h
Extension
.h
Size
60207 bytes
Lines
2281
Domain
Driver Families
Bucket
drivers/platform
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 power_limits {
	u8 ppt_pl1_spl_min;
	u8 ppt_pl1_spl_def;
	u8 ppt_pl1_spl_max;
	u8 ppt_pl2_sppt_min;
	u8 ppt_pl2_sppt_def;
	u8 ppt_pl2_sppt_max;
	u8 ppt_pl3_fppt_min;
	u8 ppt_pl3_fppt_def;
	u8 ppt_pl3_fppt_max;
	u8 ppt_apu_sppt_min;
	u8 ppt_apu_sppt_def;
	u8 ppt_apu_sppt_max;
	u8 ppt_platform_sppt_min;
	u8 ppt_platform_sppt_def;
	u8 ppt_platform_sppt_max;
	/* Nvidia GPU specific, default is always max */
	u8 nv_dynamic_boost_def; // unused. exists for macro
	u8 nv_dynamic_boost_min;
	u8 nv_dynamic_boost_max;
	u8 nv_temp_target_def; // unused. exists for macro
	u8 nv_temp_target_min;
	u8 nv_temp_target_max;
	u8 nv_tgp_def; // unused. exists for macro
	u8 nv_tgp_min;
	u8 nv_tgp_max;
};

struct power_data {
		const struct power_limits *ac_data;
		const struct power_limits *dc_data;
		bool requires_fan_curve;
};

/*
 * For each available attribute there must be a min and a max.
 * _def is not required and will be assumed to be default == max if missing.
 */
static const struct dmi_system_id power_limits[] = {
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "FA401EA"),
		},
		.driver_data = &(struct power_data) {
			.ac_data = &(struct power_limits) {
				.ppt_pl1_spl_min = 15,
				.ppt_pl1_spl_max = 95,
				.ppt_pl2_sppt_min = 35,
				.ppt_pl2_sppt_max = 100,
				.ppt_pl3_fppt_min = 35,
				.ppt_pl3_fppt_max = 115,
			},
			.dc_data = &(struct power_limits) {
				.ppt_pl1_spl_min = 15,
				.ppt_pl1_spl_max = 71,
				.ppt_pl2_sppt_min = 35,
				.ppt_pl2_sppt_max = 71,
				.ppt_pl3_fppt_min = 35,
				.ppt_pl3_fppt_max = 71,
			},
		},
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "FA401UM"),
		},
		.driver_data = &(struct power_data) {
			.ac_data = &(struct power_limits) {
				.ppt_pl1_spl_min = 15,
				.ppt_pl1_spl_max = 80,
				.ppt_pl2_sppt_min = 35,
				.ppt_pl2_sppt_max = 80,
				.ppt_pl3_fppt_min = 35,
				.ppt_pl3_fppt_max = 80,
				.nv_dynamic_boost_min = 5,
				.nv_dynamic_boost_max = 15,
				.nv_temp_target_min = 75,
				.nv_temp_target_max = 87,
			},
			.dc_data = &(struct power_limits) {
				.ppt_pl1_spl_min = 25,
				.ppt_pl1_spl_max = 35,
				.ppt_pl2_sppt_min = 31,
				.ppt_pl2_sppt_max = 44,
				.ppt_pl3_fppt_min = 45,
				.ppt_pl3_fppt_max = 65,
				.nv_temp_target_min = 75,
				.nv_temp_target_max = 87,
			},
		},

Annotation

Implementation Notes