Home | History | Annotate | Download | only in linux
      1 #ifndef _MSM_THERMAL_IOCTL_H
      2 #define _MSM_THERMAL_IOCTL_H
      3 
      4 #include <linux/ioctl.h>
      5 
      6 #define MSM_THERMAL_IOCTL_NAME "msm_thermal_query"
      7 
      8 struct __attribute__((__packed__)) cpu_freq_arg {
      9 	uint32_t cpu_num;
     10 	uint32_t freq_req;
     11 };
     12 
     13 struct __attribute__((__packed__)) msm_thermal_ioctl {
     14 	uint32_t size;
     15 	union {
     16 		struct cpu_freq_arg cpu_freq;
     17 	};
     18 };
     19 
     20 enum {
     21 	/*Set CPU Frequency*/
     22 	MSM_SET_CPU_MAX_FREQ = 0x00,
     23 	MSM_SET_CPU_MIN_FREQ = 0x01,
     24 
     25 	MSM_CMD_MAX_NR,
     26 };
     27 
     28 #define MSM_THERMAL_MAGIC_NUM 0xCA /*Unique magic number*/
     29 
     30 #define MSM_THERMAL_SET_CPU_MAX_FREQUENCY _IOW(MSM_THERMAL_MAGIC_NUM,\
     31 		MSM_SET_CPU_MAX_FREQ, struct msm_thermal_ioctl)
     32 
     33 #define MSM_THERMAL_SET_CPU_MIN_FREQUENCY _IOW(MSM_THERMAL_MAGIC_NUM,\
     34 		MSM_SET_CPU_MIN_FREQ, struct msm_thermal_ioctl)
     35 
     36 #ifdef __KERNEL__
     37 extern int msm_thermal_ioctl_init(void);
     38 extern void msm_thermal_ioctl_cleanup(void);
     39 #endif
     40 
     41 #endif
     42