From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- include/linux/sprd_cpu_cooling.h | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 include/linux/sprd_cpu_cooling.h (limited to 'include/linux/sprd_cpu_cooling.h') diff --git a/include/linux/sprd_cpu_cooling.h b/include/linux/sprd_cpu_cooling.h new file mode 100644 index 00000000..5b63d756 --- /dev/null +++ b/include/linux/sprd_cpu_cooling.h @@ -0,0 +1,55 @@ +/* + * linux/include/linux/sprd_cpu_cooling.h + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * 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. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + * + */ + +#ifndef __SPRD_CPU_COOLING_H__ +#define __SPRD_CPU_COOLING_H__ + +#define MAX_CPU_STATE 8 + +struct cooling_state { + int max_freq; + int max_core; +}; + +struct freq_vddarm { + unsigned int freq; + unsigned int vddarm_mv; +}; + +struct vddarm_update { + unsigned long state; + struct freq_vddarm *freq_vddarm; +}; +struct sprd_cpu_cooling_platform_data { + struct cooling_state cpu_state[MAX_CPU_STATE]; + struct vddarm_update *vddarm_update; + int state_num; + void *devdata; +}; + +#ifdef CONFIG_CPU_FREQ +extern int cpufreq_thermal_limit(int cluster, int limit_freq); +extern int cpufreq_table_thermal_update(int freq, int vdd_arm); +#else +extern int cpufreq_thermal_limit(int cluster, int limit_freq) {return 0;} +extern int cpufreq_table_thermal_update(int freq, int vdd_arm) {return 0;} +#endif //CONFIG_CPU_FREQ + +extern int cpu_core_thermal_limit(int cluster, int limit_core); +#endif + -- cgit v1.3.1