Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  *  Copyright (C) Linaro Ltd 2020
0004  *  Author: Daniel Lezcano <daniel.lezcano@linaro.org>
0005  */
0006 
0007 struct thermal_genl_cpu_caps {
0008     int cpu;
0009     int performance;
0010     int efficiency;
0011 };
0012 
0013 /* Netlink notification function */
0014 #ifdef CONFIG_THERMAL_NETLINK
0015 int __init thermal_netlink_init(void);
0016 int thermal_notify_tz_create(int tz_id, const char *name);
0017 int thermal_notify_tz_delete(int tz_id);
0018 int thermal_notify_tz_enable(int tz_id);
0019 int thermal_notify_tz_disable(int tz_id);
0020 int thermal_notify_tz_trip_down(int tz_id, int id, int temp);
0021 int thermal_notify_tz_trip_up(int tz_id, int id, int temp);
0022 int thermal_notify_tz_trip_delete(int tz_id, int id);
0023 int thermal_notify_tz_trip_add(int tz_id, int id, int type,
0024                    int temp, int hyst);
0025 int thermal_notify_tz_trip_change(int tz_id, int id, int type,
0026                   int temp, int hyst);
0027 int thermal_notify_cdev_state_update(int cdev_id, int state);
0028 int thermal_notify_cdev_add(int cdev_id, const char *name, int max_state);
0029 int thermal_notify_cdev_delete(int cdev_id);
0030 int thermal_notify_tz_gov_change(int tz_id, const char *name);
0031 int thermal_genl_sampling_temp(int id, int temp);
0032 int thermal_genl_cpu_capability_event(int count,
0033                       struct thermal_genl_cpu_caps *caps);
0034 #else
0035 static inline int thermal_netlink_init(void)
0036 {
0037     return 0;
0038 }
0039 
0040 static inline int thermal_notify_tz_create(int tz_id, const char *name)
0041 {
0042     return 0;
0043 }
0044 
0045 static inline int thermal_notify_tz_delete(int tz_id)
0046 {
0047     return 0;
0048 }
0049 
0050 static inline int thermal_notify_tz_enable(int tz_id)
0051 {
0052     return 0;
0053 }
0054 
0055 static inline int thermal_notify_tz_disable(int tz_id)
0056 {
0057     return 0;
0058 }
0059 
0060 static inline int thermal_notify_tz_trip_down(int tz_id, int id, int temp)
0061 {
0062     return 0;
0063 }
0064 
0065 static inline int thermal_notify_tz_trip_up(int tz_id, int id, int temp)
0066 {
0067     return 0;
0068 }
0069 
0070 static inline int thermal_notify_tz_trip_delete(int tz_id, int id)
0071 {
0072     return 0;
0073 }
0074 
0075 static inline int thermal_notify_tz_trip_add(int tz_id, int id, int type,
0076                          int temp, int hyst)
0077 {
0078     return 0;
0079 }
0080 
0081 static inline int thermal_notify_tz_trip_change(int tz_id, int id, int type,
0082                         int temp, int hyst)
0083 {
0084     return 0;
0085 }
0086 
0087 static inline int thermal_notify_cdev_state_update(int cdev_id, int state)
0088 {
0089     return 0;
0090 }
0091 
0092 static inline int thermal_notify_cdev_add(int cdev_id, const char *name,
0093                       int max_state)
0094 {
0095     return 0;
0096 }
0097 
0098 static inline int thermal_notify_cdev_delete(int cdev_id)
0099 {
0100     return 0;
0101 }
0102 
0103 static inline int thermal_notify_tz_gov_change(int tz_id, const char *name)
0104 {
0105     return 0;
0106 }
0107 
0108 static inline int thermal_genl_sampling_temp(int id, int temp)
0109 {
0110     return 0;
0111 }
0112 
0113 static inline int thermal_genl_cpu_capability_event(int count, struct thermal_genl_cpu_caps *caps)
0114 {
0115     return 0;
0116 }
0117 
0118 #endif /* CONFIG_THERMAL_NETLINK */