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