diff options
Diffstat (limited to 'original-kernel-headers/linux/msm_thermal_ioctl.h')
-rw-r--r-- | original-kernel-headers/linux/msm_thermal_ioctl.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/original-kernel-headers/linux/msm_thermal_ioctl.h b/original-kernel-headers/linux/msm_thermal_ioctl.h new file mode 100644 index 0000000..7b36493 --- /dev/null +++ b/original-kernel-headers/linux/msm_thermal_ioctl.h @@ -0,0 +1,41 @@ +#ifndef _MSM_THERMAL_IOCTL_H +#define _MSM_THERMAL_IOCTL_H + +#include <linux/ioctl.h> + +#define MSM_THERMAL_IOCTL_NAME "msm_thermal_query" + +struct __attribute__((__packed__)) cpu_freq_arg { + uint32_t cpu_num; + uint32_t freq_req; +}; + +struct __attribute__((__packed__)) msm_thermal_ioctl { + uint32_t size; + union { + struct cpu_freq_arg cpu_freq; + }; +}; + +enum { + /*Set CPU Frequency*/ + MSM_SET_CPU_MAX_FREQ = 0x00, + MSM_SET_CPU_MIN_FREQ = 0x01, + + MSM_CMD_MAX_NR, +}; + +#define MSM_THERMAL_MAGIC_NUM 0xCA /*Unique magic number*/ + +#define MSM_THERMAL_SET_CPU_MAX_FREQUENCY _IOW(MSM_THERMAL_MAGIC_NUM,\ + MSM_SET_CPU_MAX_FREQ, struct msm_thermal_ioctl) + +#define MSM_THERMAL_SET_CPU_MIN_FREQUENCY _IOW(MSM_THERMAL_MAGIC_NUM,\ + MSM_SET_CPU_MIN_FREQ, struct msm_thermal_ioctl) + +#ifdef __KERNEL__ +extern int msm_thermal_ioctl_init(void); +extern void msm_thermal_ioctl_cleanup(void); +#endif + +#endif |