blob: e20bb87849aef3c0411f600b44cacec9ef6dd5a6 [file] [log] [blame]
Rajkumar Manoharanfe6f36d2014-12-17 12:22:07 +02001/*
2 * Copyright (c) 2014 Qualcomm Atheros, Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16#ifndef _THERMAL_
17#define _THERMAL_
18
19#define ATH10K_QUIET_PERIOD_DEFAULT 100
20#define ATH10K_QUIET_PERIOD_MIN 25
21#define ATH10K_QUIET_START_OFFSET 10
22#define ATH10K_QUIET_DUTY_CYCLE_MAX 70
23
24struct ath10k_thermal {
25 struct thermal_cooling_device *cdev;
26
27 /* protected by conf_mutex */
28 u32 duty_cycle;
29};
30
31#ifdef CONFIG_THERMAL
32int ath10k_thermal_register(struct ath10k *ar);
33void ath10k_thermal_unregister(struct ath10k *ar);
34#else
35static inline int ath10k_thermal_register(struct ath10k *ar)
36{
37 return 0;
38}
39
40static inline void ath10k_thermal_unregister(struct ath10k *ar)
41{
42}
43#endif
44#endif /* _THERMAL_ */