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