blob: 2ca99003e608a86d147844323c1ec19a4884b354 [file] [log] [blame]
Praveen Chidambaram91814362012-05-25 17:36:07 -06001/*
Jennifer Liu4b4f4cc2013-04-05 15:26:33 -07002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
Praveen Chidambaram91814362012-05-25 17:36:07 -06003 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#ifndef __MSM_THERMAL_H
15#define __MSM_THERMAL_H
16
17struct msm_thermal_data {
18 uint32_t sensor_id;
19 uint32_t poll_ms;
Praveen Chidambaram5abb7db2013-02-20 17:42:17 -070020 int32_t limit_temp_degC;
21 int32_t temp_hysteresis_degC;
Eugene Seah2ee4a5d2012-06-25 18:16:41 -060022 uint32_t freq_step;
Praveen Chidambarama7435ce2013-05-03 12:52:42 -060023 uint32_t freq_control_mask;
Praveen Chidambaram5abb7db2013-02-20 17:42:17 -070024 int32_t core_limit_temp_degC;
25 int32_t core_temp_hysteresis_degC;
Jennifer Liu4ff40942013-07-30 15:25:46 -070026 int32_t hotplug_temp_degC;
27 int32_t hotplug_temp_hysteresis_degC;
Praveen Chidambaram5abb7db2013-02-20 17:42:17 -070028 uint32_t core_control_mask;
Jennifer Liu4b4f4cc2013-04-05 15:26:33 -070029 int32_t vdd_rstr_temp_degC;
30 int32_t vdd_rstr_temp_hyst_degC;
Jennifer Liu907922c2013-03-26 11:18:00 -070031 int32_t psm_temp_degC;
32 int32_t psm_temp_hyst_degC;
Praveen Chidambaram91814362012-05-25 17:36:07 -060033};
34
35#ifdef CONFIG_THERMAL_MONITOR
36extern int msm_thermal_init(struct msm_thermal_data *pdata);
Eugene Seahb77b0c42012-07-02 19:28:50 -060037extern int msm_thermal_device_init(void);
Praveen Chidambaram91814362012-05-25 17:36:07 -060038#else
39static inline int msm_thermal_init(struct msm_thermal_data *pdata)
40{
41 return -ENOSYS;
42}
Eugene Seahb77b0c42012-07-02 19:28:50 -060043static inline int msm_thermal_device_init(void)
44{
45 return -ENOSYS;
46}
Praveen Chidambaram91814362012-05-25 17:36:07 -060047#endif
48
49#endif /*__MSM_THERMAL_H*/