Server IP : 104.21.38.3 / Your IP : 172.70.147.100 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/src/linux-headers-5.15.0-143/arch/mips/include/asm/mach-loongson64/ |
Upload File : |
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __LOONGSON_HWMON_H_ #define __LOONGSON_HWMON_H_ #include <linux/types.h> #define MIN_TEMP 0 #define MAX_TEMP 255 #define NOT_VALID_TEMP 999 typedef int (*get_temp_fun)(int); extern int loongson3_cpu_temp(int); /* 0:Max speed, 1:Manual, 2:Auto */ enum fan_control_mode { FAN_FULL_MODE = 0, FAN_MANUAL_MODE = 1, FAN_AUTO_MODE = 2, FAN_MODE_END }; 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 temprature 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_*/