xref: /wlan-dirver/qca-wifi-host-cmn/umac/thermal/dispatcher/inc/wlan_thermal_public_struct.h (revision 7c7742990b15ded9d0e97405b5704faf7e14401a)
1 /* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
2  *
3  * Permission to use, copy, modify, and/or distribute this software for any
4  * purpose with or without fee is hereby granted, provided that the above
5  * copyright notice and this permission notice appear in all copies.
6  *
7  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14  */
15 
16 /**
17  * DOC: declare the thermal public structure
18  */
19 #ifndef _WLAN_THERMAL_PUBLIC_STRUCT_H_
20 #define _WLAN_THERMAL_PUBLIC_STRUCT_H_
21 
22 /**
23  * enum thermal_throttle_level - firmware offload throttle level
24  * @THERMAL_FULLPERF: no any throtting
25  * @THERMAL_MITIGATION: throtting tx to do mitigation
26  * @THERMAL_SHUTOFF: shut off the tx completely
27  * @THERMAL_SHUTDOWN_TARGET: target will be shutdown entirely
28  * @THERMAL_UNKNOWN: unknown level from target.
29  */
30 enum thermal_throttle_level {
31 	 THERMAL_FULLPERF,
32 	 THERMAL_MITIGATION,
33 	 THERMAL_SHUTOFF,
34 	 THERMAL_SHUTDOWN_TARGET,
35 	 THERMAL_UNKNOWN,
36 };
37 
38 enum thermal_stats_request_type {
39 	thermal_stats_none = 0,
40 	thermal_stats_init,
41 	thermal_stats_req,
42 	thermal_stats_clear,
43 	thermal_stats_current_all_sensors_temp,
44 };
45 
46 /**
47  * thermal_throt_level_stats - thermal throttle info from Target
48  * @start_temp_level: Start temperature range to capture thermal stats
49  * @end_temp_level: End temperature range to capture thermal stats
50  * @total_time_ms_lo: Start time for every thermal stats level in msec
51  * @total_time_ms_hi: End time for every thermal stats level in msec
52  * @num_entry: Thermal stats counter for every time temp level for this range
53  */
54 struct thermal_throt_level_stats {
55 	uint32_t start_temp_level;
56 	uint32_t end_temp_level;
57 	uint32_t total_time_ms_lo;
58 	uint32_t total_time_ms_hi;
59 	uint32_t num_entry;
60 };
61 
62 #endif /* _WLAN_THERMAL_PUBLIC_STRUCT_H_ */
63