On 27 October 2011 04:08, Kyungmin Park kmp...@infradead.org wrote:
Hi,
exynos4 tmu is already merged 3.2-rc
you can find it at below message and latest git kernel
http://www.spinics.net/lists/lm-sensors/msg33872.html
Thank you,
Kyungmin Park
ok I will rebase my work on top of sensor
Thanks for pointing this out.
On Wed, Oct 26, 2011 at 8:36 PM, Amit Daniel Kachhap
amit.kach...@linaro.org wrote:
This patch adds support for thermal sensor driver. It supports 3 trigger
level. The first 2 level are warn and monitor temperature level. The
third critical trigger level resets the system. The threshold
change information is sent to the thermal interface layer.
Signed-off-by: SangWook Ju sw...@samsung.com
Signed-off-by: Amit Daniel Kachhap amit.kach...@linaro.org
---
arch/arm/mach-exynos4/include/mach/exynos4-tmu.h | 75
drivers/staging/Kconfig | 2 +
drivers/staging/Makefile | 1 +
drivers/staging/thermal_exynos4/sensor/Kconfig | 14 +
drivers/staging/thermal_exynos4/sensor/Makefile | 4 +
.../thermal_exynos4/sensor/exynos4210_tmu.c | 465
6 files changed, 561 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-exynos4/include/mach/exynos4-tmu.h
create mode 100644 drivers/staging/thermal_exynos4/sensor/Kconfig
create mode 100644 drivers/staging/thermal_exynos4/sensor/Makefile
create mode 100644 drivers/staging/thermal_exynos4/sensor/exynos4210_tmu.c
diff --git a/arch/arm/mach-exynos4/include/mach/exynos4-tmu.h
b/arch/arm/mach-exynos4/include/mach/exynos4-tmu.h
new file mode 100644
index 000..dc7bf37
--- /dev/null
+++ b/arch/arm/mach-exynos4/include/mach/exynos4-tmu.h
@@ -0,0 +1,75 @@
+/**
+ * exynos4-tmu.h - definitions of exynos4 specific thermal interface
+ *
+ * Copyright (C) 2011 Samsung Electronics Co. ltd.
+
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _EXYNOS4_TMU_H
+#define _EXYNOS4_TMU_H
+
+/**
+ * tmu_data - tmu driver private structure
+ * @t1: colling stop temperature.
+ * @dc_temp: Temperature base.
+ * @init_threshold: Initial threshold temperature.
+ * @mode: Compensation mode.
+ * @comp_threshold: compensated threshold temperature.
+ *
+ */
+struct tmu_data {
+ char te1;
+ char te2;
+ unsigned int init_threshold;
+ int mode;
+ int cooling;
+ unsigned int comp_threshold;
+ int tmu_flag;
+};
+
+/**
+ * tmu_platform_device - tmu platform specific structure
+ * @id: Device id.
+ * @tmu_base: Memory register base.
+ * @dev: TMU device.
+ * @data: TMU driver private data structure.
+ *
+ */
+struct tmu_platform_device {
+ int id;
+ struct platform_device *pdev;
+ void __iomem *tmu_base;
+ struct device *dev;
+ struct tmu_data data;
+ struct thermal_dev *therm_fw;
+};
+
+#ifdef CONFIG_PM
+struct exynos4_tmu_register {
+ unsigned int regval_thresh_temp;
+ unsigned int regval_trig_lev0;
+ unsigned int regval_trig_lev1;
+ unsigned int regval_trig_lev2;
+ unsigned int regval_trig_lev3;
+ unsigned int regval_tmu_con0;
+ unsigned int regval_int_en;
+};
+#endif
+
+extern void exynos4_tmu_set_platdata(struct tmu_data *pd);
+extern struct tmu_platform_device *exynos4_tmu_get_platdata(void);
+extern int exynos4_tmu_get_irqno(int num);
+#endif /* _EXYNOS4_TMU_H */
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 2582e18..4376fed 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -148,4 +148,6 @@ source drivers/staging/mei/Kconfig
source drivers/staging/nvec/Kconfig
+source drivers/staging/thermal_exynos4/Kconfig
+
endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 50d112f..24a2943 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -65,3 +65,4 @@ obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += ste_rmi4/
obj-$(CONFIG_DRM_PSB) += gma500/
obj-$(CONFIG_INTEL_MEI) += mei/
obj-$(CONFIG_MFD_NVEC) += nvec/
+obj-$(CONFIG_SAMSUNG_THERMAL_INTERFACE)