Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) Linaro Ltd 2020
4 * Author: Daniel Lezcano <daniel.lezcano@linaro.org>
5 */
6
7struct thermal_genl_cpu_caps {
8 int cpu;
9 int performance;
10 int efficiency;
11};
12
13/* Netlink notification function */
14#ifdef CONFIG_THERMAL_NETLINK
15int __init thermal_netlink_init(void);
16int thermal_notify_tz_create(int tz_id, const char *name);
17int thermal_notify_tz_delete(int tz_id);
18int thermal_notify_tz_enable(int tz_id);
19int thermal_notify_tz_disable(int tz_id);
20int thermal_notify_tz_trip_down(int tz_id, int id, int temp);
21int thermal_notify_tz_trip_up(int tz_id, int id, int temp);
22int thermal_notify_tz_trip_delete(int tz_id, int id);
23int thermal_notify_tz_trip_add(int tz_id, int id, int type,
24 int temp, int hyst);
25int thermal_notify_tz_trip_change(int tz_id, int id, int type,
26 int temp, int hyst);
27int thermal_notify_cdev_state_update(int cdev_id, int state);
28int thermal_notify_cdev_add(int cdev_id, const char *name, int max_state);
29int thermal_notify_cdev_delete(int cdev_id);
30int thermal_notify_tz_gov_change(int tz_id, const char *name);
31int thermal_genl_sampling_temp(int id, int temp);
32int thermal_genl_cpu_capability_event(int count,
33 struct thermal_genl_cpu_caps *caps);
34#else
35static inline int thermal_netlink_init(void)
36{
37 return 0;
38}
39
40static inline int thermal_notify_tz_create(int tz_id, const char *name)
41{
42 return 0;
43}
44
45static inline int thermal_notify_tz_delete(int tz_id)
46{
47 return 0;
48}
49
50static inline int thermal_notify_tz_enable(int tz_id)
51{
52 return 0;
53}
54
55static inline int thermal_notify_tz_disable(int tz_id)
56{
57 return 0;
58}
59
60static inline int thermal_notify_tz_trip_down(int tz_id, int id, int temp)
61{
62 return 0;
63}
64
65static inline int thermal_notify_tz_trip_up(int tz_id, int id, int temp)
66{
67 return 0;
68}
69
70static inline int thermal_notify_tz_trip_delete(int tz_id, int id)
71{
72 return 0;
73}
74
75static inline int thermal_notify_tz_trip_add(int tz_id, int id, int type,
76 int temp, int hyst)
77{
78 return 0;
79}
80
81static inline int thermal_notify_tz_trip_change(int tz_id, int id, int type,
82 int temp, int hyst)
83{
84 return 0;
85}
86
87static inline int thermal_notify_cdev_state_update(int cdev_id, int state)
88{
89 return 0;
90}
91
92static inline int thermal_notify_cdev_add(int cdev_id, const char *name,
93 int max_state)
94{
95 return 0;
96}
97
98static inline int thermal_notify_cdev_delete(int cdev_id)
99{
100 return 0;
101}
102
103static inline int thermal_notify_tz_gov_change(int tz_id, const char *name)
104{
105 return 0;
106}
107
108static inline int thermal_genl_sampling_temp(int id, int temp)
109{
110 return 0;
111}
112
113static inline int thermal_genl_cpu_capability_event(int count, struct thermal_genl_cpu_caps *caps)
114{
115 return 0;
116}
117
118#endif /* CONFIG_THERMAL_NETLINK */