History

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.

Florian Fainelli committed 11 years ago

Commit af6c9f11 parent 9d367e54 files · +38 −30Browse files

Showing the changes to include/uapi/linux (2 of 4 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/Kbuild +1 −0
  2. include/uapi/linux/thermal.h +35 −0
include/uapi/linux/Kbuild+1−0
@@ -383,6 +383,7 @@ header-y += tcp.h · 382 unmodified lines
383header-y += tcp_metrics.h383header-y += tcp_metrics.h
384header-y += telephony.h384header-y += telephony.h
385header-y += termios.h385header-y += termios.h
386header-y += thermal.h
386header-y += time.h387header-y += time.h
387header-y += times.h388header-y += times.h
388header-y += timex.h389header-y += timex.h
include/uapi/linux/thermal.h+35−0
@@ -0,0 +1,35 @@
1#ifndef _UAPI_LINUX_THERMAL_H
2#define _UAPI_LINUX_THERMAL_H
3
4#define THERMAL_NAME_LENGTH 20
5
6/* Adding event notification support elements */
7#define THERMAL_GENL_FAMILY_NAME "thermal_event"
8#define THERMAL_GENL_VERSION 0x01
9#define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_grp"
10
11/* Events supported by Thermal Netlink */
12enum events {
13 THERMAL_AUX0,
14 THERMAL_AUX1,
15 THERMAL_CRITICAL,
16 THERMAL_DEV_FAULT,
17};
18
19/* attributes of thermal_genl_family */
20enum {
21 THERMAL_GENL_ATTR_UNSPEC,
22 THERMAL_GENL_ATTR_EVENT,
23 __THERMAL_GENL_ATTR_MAX,
24};
25#define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ATTR_MAX - 1)
26
27/* commands supported by the thermal_genl_family */
28enum {
29 THERMAL_GENL_CMD_UNSPEC,
30 THERMAL_GENL_CMD_EVENT,
31 __THERMAL_GENL_CMD_MAX,
32};
33#define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1)
34
35#endif /* _UAPI_LINUX_THERMAL_H */