diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-11-19 21:11:00 -0500 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2014-12-09 01:10:41 -0500 |
commit | af6c9f1657ca6d2ef2b2c0e31ad17c6fbf773baf (patch) | |
tree | a2a148611792c71bcee577c505b20851f07fcefd /include/linux/thermal.h | |
parent | 9d367e5e7b05c71a8c1ac4e9b6e00ba45a79f2fc (diff) |
thermal: provide an UAPI header file
include/linux/thermal.h contains definitions for the Thermal generic
netlink family, but none of the valuable information relevant to
user-space such as the Genl family name, multicast group, version or
command set and data types is exported to user-space.
Export all the relevant generic netlink information to user-space to
make this genl family usable by user-space, and while at it, export
THERMAL_NAME_LENGTH since it limits name length for thermal_hwmon
devices.
Kbuild and MAINTAINERS are also updated accordingly to reflect this new
file: include/uapi/linux/thermal.h.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r-- | include/linux/thermal.h | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index ef90838b36a0..70f87406bed9 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -29,10 +29,10 @@ | |||
29 | #include <linux/idr.h> | 29 | #include <linux/idr.h> |
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | #include <linux/workqueue.h> | 31 | #include <linux/workqueue.h> |
32 | #include <uapi/linux/thermal.h> | ||
32 | 33 | ||
33 | #define THERMAL_TRIPS_NONE -1 | 34 | #define THERMAL_TRIPS_NONE -1 |
34 | #define THERMAL_MAX_TRIPS 12 | 35 | #define THERMAL_MAX_TRIPS 12 |
35 | #define THERMAL_NAME_LENGTH 20 | ||
36 | 36 | ||
37 | /* invalid cooling state */ | 37 | /* invalid cooling state */ |
38 | #define THERMAL_CSTATE_INVALID -1UL | 38 | #define THERMAL_CSTATE_INVALID -1UL |
@@ -49,11 +49,6 @@ | |||
49 | #define MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, off) (((t) / 100) + (off)) | 49 | #define MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, off) (((t) / 100) + (off)) |
50 | #define MILLICELSIUS_TO_DECI_KELVIN(t) MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, 2732) | 50 | #define MILLICELSIUS_TO_DECI_KELVIN(t) MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, 2732) |
51 | 51 | ||
52 | /* Adding event notification support elements */ | ||
53 | #define THERMAL_GENL_FAMILY_NAME "thermal_event" | ||
54 | #define THERMAL_GENL_VERSION 0x01 | ||
55 | #define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_grp" | ||
56 | |||
57 | /* Default Thermal Governor */ | 52 | /* Default Thermal Governor */ |
58 | #if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE) | 53 | #if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE) |
59 | #define DEFAULT_THERMAL_GOVERNOR "step_wise" | 54 | #define DEFAULT_THERMAL_GOVERNOR "step_wise" |
@@ -86,30 +81,6 @@ enum thermal_trend { | |||
86 | THERMAL_TREND_DROP_FULL, /* apply lowest cooling action */ | 81 | THERMAL_TREND_DROP_FULL, /* apply lowest cooling action */ |
87 | }; | 82 | }; |
88 | 83 | ||
89 | /* Events supported by Thermal Netlink */ | ||
90 | enum events { | ||
91 | THERMAL_AUX0, | ||
92 | THERMAL_AUX1, | ||
93 | THERMAL_CRITICAL, | ||
94 | THERMAL_DEV_FAULT, | ||
95 | }; | ||
96 | |||
97 | /* attributes of thermal_genl_family */ | ||
98 | enum { | ||
99 | THERMAL_GENL_ATTR_UNSPEC, | ||
100 | THERMAL_GENL_ATTR_EVENT, | ||
101 | __THERMAL_GENL_ATTR_MAX, | ||
102 | }; | ||
103 | #define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ATTR_MAX - 1) | ||
104 | |||
105 | /* commands supported by the thermal_genl_family */ | ||
106 | enum { | ||
107 | THERMAL_GENL_CMD_UNSPEC, | ||
108 | THERMAL_GENL_CMD_EVENT, | ||
109 | __THERMAL_GENL_CMD_MAX, | ||
110 | }; | ||
111 | #define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) | ||
112 | |||
113 | struct thermal_zone_device_ops { | 84 | struct thermal_zone_device_ops { |
114 | int (*bind) (struct thermal_zone_device *, | 85 | int (*bind) (struct thermal_zone_device *, |
115 | struct thermal_cooling_device *); | 86 | struct thermal_cooling_device *); |