arch/mips/include/asm/mach-loongson64/loongson_hwmon.h

Source file repositories/reference/linux-study-clean/arch/mips/include/asm/mach-loongson64/loongson_hwmon.h

File Facts

System
Linux kernel
Corpus path
arch/mips/include/asm/mach-loongson64/loongson_hwmon.h
Extension
.h
Size
1279 bytes
Lines
57
Domain
Architecture Layer
Bucket
arch/mips
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

struct temp_range {
	u8 low;
	u8 high;
	u8 level;
};

#define CONSTANT_SPEED_POLICY	0  /* at constant speed */
#define STEP_SPEED_POLICY	1  /* use up/down arrays to describe policy */
#define KERNEL_HELPER_POLICY	2  /* kernel as a helper to fan control */

#define MAX_STEP_NUM	16
#define MAX_FAN_LEVEL	255

/* loongson_fan_policy works when fan work at FAN_AUTO_MODE */
struct loongson_fan_policy {
	u8	type;

	/* percent only used when type is CONSTANT_SPEED_POLICY */
	u8	percent;

	/* period between two check. (Unit: S) */
	u8	adjust_period;

	/* fan adjust usually depend on a temperature input */
	get_temp_fun	depend_temp;

	/* up_step/down_step used when type is STEP_SPEED_POLICY */
	u8	up_step_num;
	u8	down_step_num;
	struct temp_range up_step[MAX_STEP_NUM];
	struct temp_range down_step[MAX_STEP_NUM];
	struct delayed_work work;
};

#endif /* __LOONGSON_HWMON_H_*/

Annotation

Implementation Notes