1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _MSM_THERMAL_IOCTL_H
20#define _MSM_THERMAL_IOCTL_H
21#include <linux/ioctl.h>
22#define MSM_THERMAL_IOCTL_NAME "msm_thermal_query"
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define MSM_IOCTL_FREQ_SIZE 16
25struct __attribute__((__packed__)) cpu_freq_arg {
26  uint32_t cpu_num;
27  uint32_t freq_req;
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29};
30struct __attribute__((__packed__)) clock_plan_arg {
31  uint32_t cluster_num;
32  uint32_t freq_table_len;
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34  uint32_t set_idx;
35  unsigned int freq_table[MSM_IOCTL_FREQ_SIZE];
36};
37struct __attribute__((__packed__)) voltage_plan_arg {
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  uint32_t cluster_num;
40  uint32_t voltage_table_len;
41  uint32_t set_idx;
42  uint32_t voltage_table[MSM_IOCTL_FREQ_SIZE];
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44};
45struct __attribute__((__packed__)) msm_thermal_ioctl {
46  uint32_t size;
47  union {
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49    struct cpu_freq_arg cpu_freq;
50    struct clock_plan_arg clock_freq;
51    struct voltage_plan_arg voltage;
52  };
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54};
55enum {
56  MSM_SET_CPU_MAX_FREQ = 0x00,
57  MSM_SET_CPU_MIN_FREQ = 0x01,
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  MSM_SET_CLUSTER_MAX_FREQ = 0x02,
60  MSM_SET_CLUSTER_MIN_FREQ = 0x03,
61  MSM_GET_CLUSTER_FREQ_PLAN = 0x04,
62  MSM_GET_CLUSTER_VOLTAGE_PLAN = 0x05,
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  MSM_CMD_MAX_NR,
65};
66#define MSM_THERMAL_MAGIC_NUM 0xCA
67#define MSM_THERMAL_SET_CPU_MAX_FREQUENCY _IOW(MSM_THERMAL_MAGIC_NUM, MSM_SET_CPU_MAX_FREQ, struct msm_thermal_ioctl)
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define MSM_THERMAL_SET_CPU_MIN_FREQUENCY _IOW(MSM_THERMAL_MAGIC_NUM, MSM_SET_CPU_MIN_FREQ, struct msm_thermal_ioctl)
70#define MSM_THERMAL_SET_CLUSTER_MAX_FREQUENCY _IOW(MSM_THERMAL_MAGIC_NUM, MSM_SET_CLUSTER_MAX_FREQ, struct msm_thermal_ioctl)
71#define MSM_THERMAL_SET_CLUSTER_MIN_FREQUENCY _IOW(MSM_THERMAL_MAGIC_NUM, MSM_SET_CLUSTER_MIN_FREQ, struct msm_thermal_ioctl)
72#define MSM_THERMAL_GET_CLUSTER_FREQUENCY_PLAN _IOR(MSM_THERMAL_MAGIC_NUM, MSM_GET_CLUSTER_FREQ_PLAN, struct msm_thermal_ioctl)
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define MSM_THERMAL_GET_CLUSTER_VOLTAGE_PLAN _IOR(MSM_THERMAL_MAGIC_NUM, MSM_GET_CLUSTER_VOLTAGE_PLAN, struct msm_thermal_ioctl)
75#endif
76
77