xref: /OK3568_Linux_fs/u-boot/include/tmu.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
3*4882a593Smuzhiyun  *      http://www.samsung.com
4*4882a593Smuzhiyun  * Akshay Saraswat <akshay.s@samsung.com>
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * Thermal Management Unit
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  * See file CREDITS for list of people who contributed to this
9*4882a593Smuzhiyun  * project.
10*4882a593Smuzhiyun  *
11*4882a593Smuzhiyun  * This program is free software; you can redistribute it and/or modify
12*4882a593Smuzhiyun  * it under the terms of the GNU General Public License version 2 as
13*4882a593Smuzhiyun  * published by the Free Software Foundation.
14*4882a593Smuzhiyun  * You should have received a copy of the GNU General Public License
15*4882a593Smuzhiyun  * along with this program; if not, write to the Free Software
16*4882a593Smuzhiyun  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
17*4882a593Smuzhiyun  * MA 02111-1307 USA
18*4882a593Smuzhiyun  */
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun #ifndef _TMU_H
21*4882a593Smuzhiyun #define _TMU_H
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun enum tmu_status_t {
24*4882a593Smuzhiyun 	TMU_STATUS_INIT = -1,
25*4882a593Smuzhiyun 	TMU_STATUS_NORMAL = 0,
26*4882a593Smuzhiyun 	TMU_STATUS_WARNING,
27*4882a593Smuzhiyun 	TMU_STATUS_TRIPPED,
28*4882a593Smuzhiyun };
29*4882a593Smuzhiyun 
30*4882a593Smuzhiyun /*
31*4882a593Smuzhiyun  * Monitors status of the TMU device and exynos temperature
32*4882a593Smuzhiyun  *
33*4882a593Smuzhiyun  * @param temp	pointer to the current temperature value
34*4882a593Smuzhiyun  * @return	enum tmu_status_t value, code indicating event to execute
35*4882a593Smuzhiyun  *		and -1 on error
36*4882a593Smuzhiyun  */
37*4882a593Smuzhiyun enum tmu_status_t tmu_monitor(int *temp);
38*4882a593Smuzhiyun 
39*4882a593Smuzhiyun /*
40*4882a593Smuzhiyun  * Initialize TMU device
41*4882a593Smuzhiyun  *
42*4882a593Smuzhiyun  * @param blob  FDT blob
43*4882a593Smuzhiyun  * @return	int value, 0 for success
44*4882a593Smuzhiyun  */
45*4882a593Smuzhiyun int tmu_init(const void *blob);
46*4882a593Smuzhiyun #endif	/* _THERMAL_H_ */
47