Merge 'irq/loongarch', 'pci/ctrl/loongson' and 'pci/header-cleanup-immutable'
[linux-2.6-microblaze.git] / drivers / thermal / thermal_netlink.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  *  Copyright (C) Linaro Ltd 2020
4  *  Author: Daniel Lezcano <daniel.lezcano@linaro.org>
5  */
6
7 struct thermal_genl_cpu_caps {
8         int cpu;
9         int performance;
10         int efficiency;
11 };
12
13 /* Netlink notification function */
14 #ifdef CONFIG_THERMAL_NETLINK
15 int __init thermal_netlink_init(void);
16 int thermal_notify_tz_create(int tz_id, const char *name);
17 int thermal_notify_tz_delete(int tz_id);
18 int thermal_notify_tz_enable(int tz_id);
19 int thermal_notify_tz_disable(int tz_id);
20 int thermal_notify_tz_trip_down(int tz_id, int id, int temp);
21 int thermal_notify_tz_trip_up(int tz_id, int id, int temp);
22 int thermal_notify_tz_trip_delete(int tz_id, int id);
23 int thermal_notify_tz_trip_add(int tz_id, int id, int type,
24                                int temp, int hyst);
25 int thermal_notify_tz_trip_change(int tz_id, int id, int type,
26                                   int temp, int hyst);
27 int thermal_notify_cdev_state_update(int cdev_id, int state);
28 int thermal_notify_cdev_add(int cdev_id, const char *name, int max_state);
29 int thermal_notify_cdev_delete(int cdev_id);
30 int thermal_notify_tz_gov_change(int tz_id, const char *name);
31 int thermal_genl_sampling_temp(int id, int temp);
32 int thermal_genl_cpu_capability_event(int count,
33                                       struct thermal_genl_cpu_caps *caps);
34 #else
35 static inline int thermal_netlink_init(void)
36 {
37         return 0;
38 }
39
40 static inline int thermal_notify_tz_create(int tz_id, const char *name)
41 {
42         return 0;
43 }
44
45 static inline int thermal_notify_tz_delete(int tz_id)
46 {
47         return 0;
48 }
49
50 static inline int thermal_notify_tz_enable(int tz_id)
51 {
52         return 0;
53 }
54
55 static inline int thermal_notify_tz_disable(int tz_id)
56 {
57         return 0;
58 }
59
60 static inline int thermal_notify_tz_trip_down(int tz_id, int id, int temp)
61 {
62         return 0;
63 }
64
65 static inline int thermal_notify_tz_trip_up(int tz_id, int id, int temp)
66 {
67         return 0;
68 }
69
70 static inline int thermal_notify_tz_trip_delete(int tz_id, int id)
71 {
72         return 0;
73 }
74
75 static 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
81 static 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
87 static inline int thermal_notify_cdev_state_update(int cdev_id, int state)
88 {
89         return 0;
90 }
91
92 static inline int thermal_notify_cdev_add(int cdev_id, const char *name,
93                                           int max_state)
94 {
95         return 0;
96 }
97
98 static inline int thermal_notify_cdev_delete(int cdev_id)
99 {
100         return 0;
101 }
102
103 static inline int thermal_notify_tz_gov_change(int tz_id, const char *name)
104 {
105         return 0;
106 }
107
108 static inline int thermal_genl_sampling_temp(int id, int temp)
109 {
110         return 0;
111 }
112
113 static 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 */