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
thermal_netlink_init(void)35 static inline int thermal_netlink_init(void)
36 {
37 	return 0;
38 }
39 
thermal_notify_tz_create(int tz_id,const char * name)40 static inline int thermal_notify_tz_create(int tz_id, const char *name)
41 {
42 	return 0;
43 }
44 
thermal_notify_tz_delete(int tz_id)45 static inline int thermal_notify_tz_delete(int tz_id)
46 {
47 	return 0;
48 }
49 
thermal_notify_tz_enable(int tz_id)50 static inline int thermal_notify_tz_enable(int tz_id)
51 {
52 	return 0;
53 }
54 
thermal_notify_tz_disable(int tz_id)55 static inline int thermal_notify_tz_disable(int tz_id)
56 {
57 	return 0;
58 }
59 
thermal_notify_tz_trip_down(int tz_id,int id,int temp)60 static inline int thermal_notify_tz_trip_down(int tz_id, int id, int temp)
61 {
62 	return 0;
63 }
64 
thermal_notify_tz_trip_up(int tz_id,int id,int temp)65 static inline int thermal_notify_tz_trip_up(int tz_id, int id, int temp)
66 {
67 	return 0;
68 }
69 
thermal_notify_tz_trip_delete(int tz_id,int id)70 static inline int thermal_notify_tz_trip_delete(int tz_id, int id)
71 {
72 	return 0;
73 }
74 
thermal_notify_tz_trip_add(int tz_id,int id,int type,int temp,int hyst)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 
thermal_notify_tz_trip_change(int tz_id,int id,int type,int temp,int hyst)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 
thermal_notify_cdev_state_update(int cdev_id,int state)87 static inline int thermal_notify_cdev_state_update(int cdev_id, int state)
88 {
89 	return 0;
90 }
91 
thermal_notify_cdev_add(int cdev_id,const char * name,int max_state)92 static inline int thermal_notify_cdev_add(int cdev_id, const char *name,
93 					  int max_state)
94 {
95 	return 0;
96 }
97 
thermal_notify_cdev_delete(int cdev_id)98 static inline int thermal_notify_cdev_delete(int cdev_id)
99 {
100 	return 0;
101 }
102 
thermal_notify_tz_gov_change(int tz_id,const char * name)103 static inline int thermal_notify_tz_gov_change(int tz_id, const char *name)
104 {
105 	return 0;
106 }
107 
thermal_genl_sampling_temp(int id,int temp)108 static inline int thermal_genl_sampling_temp(int id, int temp)
109 {
110 	return 0;
111 }
112 
thermal_genl_cpu_capability_event(int count,struct thermal_genl_cpu_caps * caps)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 */
119