OSDN Git Service

powerpc/configs/6s: Drop obsolete crypto ALGs
[tomoyo/tomoyo-test1.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 void __init thermal_netlink_exit(void);
17 int thermal_notify_tz_create(int tz_id, const char *name);
18 int thermal_notify_tz_delete(int tz_id);
19 int thermal_notify_tz_enable(int tz_id);
20 int thermal_notify_tz_disable(int tz_id);
21 int thermal_notify_tz_trip_down(int tz_id, int id, int temp);
22 int thermal_notify_tz_trip_up(int tz_id, int id, int temp);
23 int thermal_notify_tz_trip_delete(int tz_id, int id);
24 int thermal_notify_tz_trip_add(int tz_id, int id, int type,
25                                int temp, int hyst);
26 int thermal_notify_tz_trip_change(int tz_id, int id, int type,
27                                   int temp, int hyst);
28 int thermal_notify_cdev_state_update(int cdev_id, int state);
29 int thermal_notify_cdev_add(int cdev_id, const char *name, int max_state);
30 int thermal_notify_cdev_delete(int cdev_id);
31 int thermal_notify_tz_gov_change(int tz_id, const char *name);
32 int thermal_genl_sampling_temp(int id, int temp);
33 int thermal_genl_cpu_capability_event(int count,
34                                       struct thermal_genl_cpu_caps *caps);
35 #else
36 static inline int thermal_netlink_init(void)
37 {
38         return 0;
39 }
40
41 static inline int thermal_notify_tz_create(int tz_id, const char *name)
42 {
43         return 0;
44 }
45
46 static inline int thermal_notify_tz_delete(int tz_id)
47 {
48         return 0;
49 }
50
51 static inline int thermal_notify_tz_enable(int tz_id)
52 {
53         return 0;
54 }
55
56 static inline int thermal_notify_tz_disable(int tz_id)
57 {
58         return 0;
59 }
60
61 static inline int thermal_notify_tz_trip_down(int tz_id, int id, int temp)
62 {
63         return 0;
64 }
65
66 static inline int thermal_notify_tz_trip_up(int tz_id, int id, int temp)
67 {
68         return 0;
69 }
70
71 static inline int thermal_notify_tz_trip_delete(int tz_id, int id)
72 {
73         return 0;
74 }
75
76 static inline int thermal_notify_tz_trip_add(int tz_id, int id, int type,
77                                              int temp, int hyst)
78 {
79         return 0;
80 }
81
82 static inline int thermal_notify_tz_trip_change(int tz_id, int id, int type,
83                                                 int temp, int hyst)
84 {
85         return 0;
86 }
87
88 static inline int thermal_notify_cdev_state_update(int cdev_id, int state)
89 {
90         return 0;
91 }
92
93 static inline int thermal_notify_cdev_add(int cdev_id, const char *name,
94                                           int max_state)
95 {
96         return 0;
97 }
98
99 static inline int thermal_notify_cdev_delete(int cdev_id)
100 {
101         return 0;
102 }
103
104 static inline int thermal_notify_tz_gov_change(int tz_id, const char *name)
105 {
106         return 0;
107 }
108
109 static inline int thermal_genl_sampling_temp(int id, int temp)
110 {
111         return 0;
112 }
113
114 static inline int thermal_genl_cpu_capability_event(int count, struct thermal_genl_cpu_caps *caps)
115 {
116         return 0;
117 }
118
119 static inline void __init thermal_netlink_exit(void) {}
120
121 #endif /* CONFIG_THERMAL_NETLINK */