blob: 2e3270da35f9e18d274b52d952e4d5919c784b07 [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;
Ram Chandrasekar89961312013-11-07 12:03:54 -070022 uint32_t bootup_freq_step;
23 uint32_t bootup_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;
Ram Chandrasekar89961312013-11-07 12:03:54 -070029 uint32_t freq_mitig_temp_degc;
30 uint32_t freq_mitig_temp_hysteresis_degc;
31 uint32_t freq_mitig_control_mask;
32 uint32_t freq_limit;
Jennifer Liu4b4f4cc2013-04-05 15:26:33 -070033 int32_t vdd_rstr_temp_degC;
34 int32_t vdd_rstr_temp_hyst_degC;
Jennifer Liu907922c2013-03-26 11:18:00 -070035 int32_t psm_temp_degC;
36 int32_t psm_temp_hyst_degC;
Ram Chandrasekar37716582013-12-10 16:09:30 -070037 int32_t ocr_temp_degC;
38 int32_t ocr_temp_hyst_degC;
Ram Chandrasekar75015392014-01-31 15:59:58 -070039 int32_t therm_reset_temp_degC;
Praveen Chidambaram91814362012-05-25 17:36:07 -060040};
41
42#ifdef CONFIG_THERMAL_MONITOR
43extern int msm_thermal_init(struct msm_thermal_data *pdata);
Eugene Seahb77b0c42012-07-02 19:28:50 -060044extern int msm_thermal_device_init(void);
Ram Chandrasekar64603922013-11-08 16:33:58 -070045extern int msm_thermal_set_frequency(uint32_t cpu, uint32_t freq,
46 bool is_max);
Praveen Chidambaram91814362012-05-25 17:36:07 -060047#else
48static inline int msm_thermal_init(struct msm_thermal_data *pdata)
49{
50 return -ENOSYS;
51}
Eugene Seahb77b0c42012-07-02 19:28:50 -060052static inline int msm_thermal_device_init(void)
53{
54 return -ENOSYS;
55}
Ram Chandrasekar64603922013-11-08 16:33:58 -070056static inline int msm_thermal_set_frequency(uint32_t cpu, uint32_t freq,
57 bool is_max)
58{
59 return -ENOSYS;
60}
Praveen Chidambaram91814362012-05-25 17:36:07 -060061#endif
62
63#endif /*__MSM_THERMAL_H*/