1
2#ifndef _UAPI_LINUX_THERMAL_H
3#define _UAPI_LINUX_THERMAL_H
4
5#define THERMAL_NAME_LENGTH 20
6
7enum thermal_device_mode {
8 THERMAL_DEVICE_DISABLED = 0,
9 THERMAL_DEVICE_ENABLED,
10};
11
12enum thermal_trip_type {
13 THERMAL_TRIP_ACTIVE = 0,
14 THERMAL_TRIP_PASSIVE,
15 THERMAL_TRIP_HOT,
16 THERMAL_TRIP_CRITICAL,
17};
18
19
20#define THERMAL_GENL_FAMILY_NAME "thermal"
21#define THERMAL_GENL_VERSION 0x01
22#define THERMAL_GENL_SAMPLING_GROUP_NAME "sampling"
23#define THERMAL_GENL_EVENT_GROUP_NAME "event"
24
25
26enum thermal_genl_attr {
27 THERMAL_GENL_ATTR_UNSPEC,
28 THERMAL_GENL_ATTR_TZ,
29 THERMAL_GENL_ATTR_TZ_ID,
30 THERMAL_GENL_ATTR_TZ_TEMP,
31 THERMAL_GENL_ATTR_TZ_TRIP,
32 THERMAL_GENL_ATTR_TZ_TRIP_ID,
33 THERMAL_GENL_ATTR_TZ_TRIP_TYPE,
34 THERMAL_GENL_ATTR_TZ_TRIP_TEMP,
35 THERMAL_GENL_ATTR_TZ_TRIP_HYST,
36 THERMAL_GENL_ATTR_TZ_MODE,
37 THERMAL_GENL_ATTR_TZ_NAME,
38 THERMAL_GENL_ATTR_TZ_CDEV_WEIGHT,
39 THERMAL_GENL_ATTR_TZ_GOV,
40 THERMAL_GENL_ATTR_TZ_GOV_NAME,
41 THERMAL_GENL_ATTR_CDEV,
42 THERMAL_GENL_ATTR_CDEV_ID,
43 THERMAL_GENL_ATTR_CDEV_CUR_STATE,
44 THERMAL_GENL_ATTR_CDEV_MAX_STATE,
45 THERMAL_GENL_ATTR_CDEV_NAME,
46 THERMAL_GENL_ATTR_GOV_NAME,
47
48 __THERMAL_GENL_ATTR_MAX,
49};
50#define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ATTR_MAX - 1)
51
52enum thermal_genl_sampling {
53 THERMAL_GENL_SAMPLING_TEMP,
54 __THERMAL_GENL_SAMPLING_MAX,
55};
56#define THERMAL_GENL_SAMPLING_MAX (__THERMAL_GENL_SAMPLING_MAX - 1)
57
58
59enum thermal_genl_event {
60 THERMAL_GENL_EVENT_UNSPEC,
61 THERMAL_GENL_EVENT_TZ_CREATE,
62 THERMAL_GENL_EVENT_TZ_DELETE,
63 THERMAL_GENL_EVENT_TZ_DISABLE,
64 THERMAL_GENL_EVENT_TZ_ENABLE,
65 THERMAL_GENL_EVENT_TZ_TRIP_UP,
66 THERMAL_GENL_EVENT_TZ_TRIP_DOWN,
67 THERMAL_GENL_EVENT_TZ_TRIP_CHANGE,
68 THERMAL_GENL_EVENT_TZ_TRIP_ADD,
69 THERMAL_GENL_EVENT_TZ_TRIP_DELETE,
70 THERMAL_GENL_EVENT_CDEV_ADD,
71 THERMAL_GENL_EVENT_CDEV_DELETE,
72 THERMAL_GENL_EVENT_CDEV_STATE_UPDATE,
73 THERMAL_GENL_EVENT_TZ_GOV_CHANGE,
74 __THERMAL_GENL_EVENT_MAX,
75};
76#define THERMAL_GENL_EVENT_MAX (__THERMAL_GENL_EVENT_MAX - 1)
77
78
79enum thermal_genl_cmd {
80 THERMAL_GENL_CMD_UNSPEC,
81 THERMAL_GENL_CMD_TZ_GET_ID,
82 THERMAL_GENL_CMD_TZ_GET_TRIP,
83 THERMAL_GENL_CMD_TZ_GET_TEMP,
84 THERMAL_GENL_CMD_TZ_GET_GOV,
85 THERMAL_GENL_CMD_TZ_GET_MODE,
86 THERMAL_GENL_CMD_CDEV_GET,
87 __THERMAL_GENL_CMD_MAX,
88};
89#define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1)
90
91#endif
92