drm/rockchip: Don't change hdmi reference clock rate
[drm/drm-misc.git] / drivers / net / wireless / ath / ath11k / thermal.h
blobcdaf4e01d92eabab11b8a22f5d38417f989dc8dc
1 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
2 /*
3 * Copyright (c) 2020 The Linux Foundation. All rights reserved.
4 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
5 */
7 #ifndef _ATH11K_THERMAL_
8 #define _ATH11K_THERMAL_
10 #define ATH11K_THERMAL_TEMP_LOW_MARK -100
11 #define ATH11K_THERMAL_TEMP_HIGH_MARK 150
12 #define ATH11K_THERMAL_THROTTLE_MAX 100
13 #define ATH11K_THERMAL_DEFAULT_DUTY_CYCLE 100
14 #define ATH11K_HWMON_NAME_LEN 15
15 #define ATH11K_THERMAL_SYNC_TIMEOUT_HZ (5 * HZ)
17 struct ath11k_thermal {
18 struct thermal_cooling_device *cdev;
19 struct completion wmi_sync;
21 /* protected by conf_mutex */
22 u32 throttle_state;
23 /* temperature value in Celsius degree
24 * protected by data_lock
26 int temperature;
29 #if IS_REACHABLE(CONFIG_THERMAL)
30 int ath11k_thermal_register(struct ath11k_base *ab);
31 void ath11k_thermal_unregister(struct ath11k_base *ab);
32 int ath11k_thermal_set_throttling(struct ath11k *ar, u32 throttle_state);
33 void ath11k_thermal_event_temperature(struct ath11k *ar, int temperature);
34 #else
35 static inline int ath11k_thermal_register(struct ath11k_base *ab)
37 return 0;
40 static inline void ath11k_thermal_unregister(struct ath11k_base *ab)
44 static inline int ath11k_thermal_set_throttling(struct ath11k *ar, u32 throttle_state)
46 return 0;
49 static inline void ath11k_thermal_event_temperature(struct ath11k *ar,
50 int temperature)
54 #endif
55 #endif /* _ATH11K_THERMAL_ */