1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) Linaro Ltd 2020
4 * Author: Daniel Lezcano <daniel.lezcano@linaro.org>
7 struct thermal_genl_cpu_caps {
13 struct thermal_zone_device;
15 struct thermal_cooling_device;
17 /* Netlink notification function */
18 #ifdef CONFIG_THERMAL_NETLINK
19 int __init thermal_netlink_init(void);
20 void __init thermal_netlink_exit(void);
21 int thermal_notify_tz_create(const struct thermal_zone_device *tz);
22 int thermal_notify_tz_delete(const struct thermal_zone_device *tz);
23 int thermal_notify_tz_enable(const struct thermal_zone_device *tz);
24 int thermal_notify_tz_disable(const struct thermal_zone_device *tz);
25 int thermal_notify_tz_trip_down(const struct thermal_zone_device *tz,
26 const struct thermal_trip *trip);
27 int thermal_notify_tz_trip_up(const struct thermal_zone_device *tz,
28 const struct thermal_trip *trip);
29 int thermal_notify_tz_trip_change(const struct thermal_zone_device *tz,
30 const struct thermal_trip *trip);
31 int thermal_notify_cdev_state_update(const struct thermal_cooling_device *cdev,
33 int thermal_notify_cdev_add(const struct thermal_cooling_device *cdev);
34 int thermal_notify_cdev_delete(const struct thermal_cooling_device *cdev);
35 int thermal_notify_tz_gov_change(const struct thermal_zone_device *tz,
37 int thermal_genl_sampling_temp(int id, int temp);
38 int thermal_genl_cpu_capability_event(int count,
39 struct thermal_genl_cpu_caps *caps);
41 static inline int thermal_netlink_init(void)
46 static inline int thermal_notify_tz_create(const struct thermal_zone_device *tz)
51 static inline int thermal_notify_tz_delete(const struct thermal_zone_device *tz)
56 static inline int thermal_notify_tz_enable(const struct thermal_zone_device *tz)
61 static inline int thermal_notify_tz_disable(const struct thermal_zone_device *tz)
66 static inline int thermal_notify_tz_trip_down(const struct thermal_zone_device *tz,
67 const struct thermal_trip *trip)
72 static inline int thermal_notify_tz_trip_up(const struct thermal_zone_device *tz,
73 const struct thermal_trip *trip)
78 static inline int thermal_notify_tz_trip_change(const struct thermal_zone_device *tz,
79 const struct thermal_trip *trip)
84 static inline int thermal_notify_cdev_state_update(const struct thermal_cooling_device *cdev,
90 static inline int thermal_notify_cdev_add(const struct thermal_cooling_device *cdev)
95 static inline int thermal_notify_cdev_delete(const struct thermal_cooling_device *cdev)
100 static inline int thermal_notify_tz_gov_change(const struct thermal_zone_device *tz,
106 static inline int thermal_genl_sampling_temp(int id, int temp)
111 static inline int thermal_genl_cpu_capability_event(int count, struct thermal_genl_cpu_caps *caps)
116 static inline void __init thermal_netlink_exit(void) {}
118 #endif /* CONFIG_THERMAL_NETLINK */