include/linux/amd-pmf-io.h

Source file repositories/reference/linux-study-clean/include/linux/amd-pmf-io.h

File Facts

System
Linux kernel
Corpus path
include/linux/amd-pmf-io.h
Extension
.h
Size
2152 bytes
Lines
87
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct amd_sfh_info {
	u32 ambient_light;
	u8 user_present;
	u32 platform_type;
	u32 laptop_placement;
};

enum laptop_placement {
	LP_UNKNOWN = 0,
	ON_TABLE,
	ON_LAP_MOTION,
	IN_BAG,
	OUT_OF_BAG,
	LP_UNDEFINED,
};

/**
 * struct amd_pmf_npu_metrics: Get NPU metrics data from PMF driver
 * @npuclk_freq: NPU clock frequency [MHz]
 * @npu_busy: NPU busy % [0-100]
 * @npu_power: NPU power [mW]
 * @mpnpuclk_freq: MPNPU [MHz]
 * @npu_reads: NPU read bandwidth [MB/sec]
 * @npu_writes: NPU write bandwidth [MB/sec]
 */
struct amd_pmf_npu_metrics {
	u16 npuclk_freq;
	u16 npu_busy[8];
	u16 npu_power;
	u16 mpnpuclk_freq;
	u16 npu_reads;
	u16 npu_writes;
};

int amd_get_sfh_info(struct amd_sfh_info *sfh_info, enum sfh_message_type op);

/* AMD PMF and NPU interface */
int amd_pmf_get_npu_data(struct amd_pmf_npu_metrics *info);
#endif

Annotation

Implementation Notes