summaryrefslogtreecommitdiffstats
path: root/include/linux/tegra_throttle.h
blob: 04344dbee325d0c5f2a2cd2b84657c21216b222d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 * include/linux/tegra_throttle.h
 *
 * Copyright (c) 2010-2017 NVIDIA CORPORATION. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef __TEGRA_THROTTLE_H
#define __TEGRA_THROTTLE_H

#include <linux/therm_est.h>
#include <linux/thermal.h>

struct tegra_cooling_device {
	char *cdev_type;
	int *trip_temperatures;
	int trip_temperatures_num;
	const char *compatible;
	struct device_node *cdev_dn;
};

#define MAX_THROT_TABLE_SIZE	(64)
#define NO_CAP			(ULONG_MAX) /* no cap */
#define CPU_THROT_LOW		0 /* lowest throttle freq. only used for CPU */


#ifdef CONFIG_TEGRA_THERMAL_THROTTLE
bool tegra_is_throttling(int *count);
#else
static inline bool tegra_is_throttling(int *count)
{ return false; }
#endif /* CONFIG_TEGRA_THERMAL_THROTTLE */

#endif	/* __TEGRA_THROTTLE_H */