1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux << 2 #ifndef _UAPI_LINUX_THERMAL_H 1 #ifndef _UAPI_LINUX_THERMAL_H 3 #define _UAPI_LINUX_THERMAL_H 2 #define _UAPI_LINUX_THERMAL_H 4 3 5 #define THERMAL_NAME_LENGTH 20 4 #define THERMAL_NAME_LENGTH 20 6 5 7 enum thermal_device_mode { << 8 THERMAL_DEVICE_DISABLED = 0, << 9 THERMAL_DEVICE_ENABLED, << 10 }; << 11 << 12 enum thermal_trip_type { << 13 THERMAL_TRIP_ACTIVE = 0, << 14 THERMAL_TRIP_PASSIVE, << 15 THERMAL_TRIP_HOT, << 16 THERMAL_TRIP_CRITICAL, << 17 }; << 18 << 19 /* Adding event notification support elements 6 /* Adding event notification support elements */ 20 #define THERMAL_GENL_FAMILY_NAME !! 7 #define THERMAL_GENL_FAMILY_NAME "thermal_event" 21 #define THERMAL_GENL_VERSION !! 8 #define THERMAL_GENL_VERSION 0x01 22 #define THERMAL_GENL_SAMPLING_GROUP_NAME !! 9 #define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_grp" 23 #define THERMAL_GENL_EVENT_GROUP_NAME !! 10 >> 11 /* Events supported by Thermal Netlink */ >> 12 enum events { >> 13 THERMAL_AUX0, >> 14 THERMAL_AUX1, >> 15 THERMAL_CRITICAL, >> 16 THERMAL_DEV_FAULT, >> 17 }; 24 18 25 /* Attributes of thermal_genl_family */ !! 19 /* attributes of thermal_genl_family */ 26 enum thermal_genl_attr { !! 20 enum { 27 THERMAL_GENL_ATTR_UNSPEC, 21 THERMAL_GENL_ATTR_UNSPEC, 28 THERMAL_GENL_ATTR_TZ, !! 22 THERMAL_GENL_ATTR_EVENT, 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 THERMAL_GENL_ATTR_CPU_CAPABILITY, << 48 THERMAL_GENL_ATTR_CPU_CAPABILITY_ID, << 49 THERMAL_GENL_ATTR_CPU_CAPABILITY_PERFO << 50 THERMAL_GENL_ATTR_CPU_CAPABILITY_EFFIC << 51 __THERMAL_GENL_ATTR_MAX, 23 __THERMAL_GENL_ATTR_MAX, 52 }; 24 }; 53 #define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ 25 #define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ATTR_MAX - 1) 54 26 55 enum thermal_genl_sampling { !! 27 /* commands supported by the thermal_genl_family */ 56 THERMAL_GENL_SAMPLING_TEMP, !! 28 enum { 57 __THERMAL_GENL_SAMPLING_MAX, << 58 }; << 59 #define THERMAL_GENL_SAMPLING_MAX (__THERMAL_G << 60 << 61 /* Events of thermal_genl_family */ << 62 enum thermal_genl_event { << 63 THERMAL_GENL_EVENT_UNSPEC, << 64 THERMAL_GENL_EVENT_TZ_CREATE, << 65 THERMAL_GENL_EVENT_TZ_DELETE, << 66 THERMAL_GENL_EVENT_TZ_DISABLE, << 67 THERMAL_GENL_EVENT_TZ_ENABLE, << 68 THERMAL_GENL_EVENT_TZ_TRIP_UP, << 69 THERMAL_GENL_EVENT_TZ_TRIP_DOWN, << 70 THERMAL_GENL_EVENT_TZ_TRIP_CHANGE, << 71 THERMAL_GENL_EVENT_TZ_TRIP_ADD, << 72 THERMAL_GENL_EVENT_TZ_TRIP_DELETE, << 73 THERMAL_GENL_EVENT_CDEV_ADD, << 74 THERMAL_GENL_EVENT_CDEV_DELETE, << 75 THERMAL_GENL_EVENT_CDEV_STATE_UPDATE, << 76 THERMAL_GENL_EVENT_TZ_GOV_CHANGE, << 77 THERMAL_GENL_EVENT_CPU_CAPABILITY_CHAN << 78 __THERMAL_GENL_EVENT_MAX, << 79 }; << 80 #define THERMAL_GENL_EVENT_MAX (__THERMAL_GENL << 81 << 82 /* Commands supported by the thermal_genl_fami << 83 enum thermal_genl_cmd { << 84 THERMAL_GENL_CMD_UNSPEC, 29 THERMAL_GENL_CMD_UNSPEC, 85 THERMAL_GENL_CMD_TZ_GET_ID, /* Lis !! 30 THERMAL_GENL_CMD_EVENT, 86 THERMAL_GENL_CMD_TZ_GET_TRIP, /* Lis << 87 THERMAL_GENL_CMD_TZ_GET_TEMP, /* Get << 88 THERMAL_GENL_CMD_TZ_GET_GOV, /* Get << 89 THERMAL_GENL_CMD_TZ_GET_MODE, /* Get << 90 THERMAL_GENL_CMD_CDEV_GET, /* Lis << 91 __THERMAL_GENL_CMD_MAX, 31 __THERMAL_GENL_CMD_MAX, 92 }; 32 }; 93 #define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_C 33 #define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) 94 34 95 #endif /* _UAPI_LINUX_THERMAL_H */ 35 #endif /* _UAPI_LINUX_THERMAL_H */ 96 36
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.