aboutsummaryrefslogtreecommitdiff
path: root/include/linux/msm_thermal_ioctl.h
blob: 7b364934bda644a68e4198a201882928695c5365 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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