summaryrefslogtreecommitdiff
path: root/arch/arm/mach-exynos4/dev-tmu.c
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2011-12-14 12:08:53 -0500
committerNicolas Pitre <nicolas.pitre@linaro.org>2011-12-14 12:08:53 -0500
commit1226e419377fb4b53d6e08c0a9fd5ecf90597cd6 (patch)
tree4dc413e65d771150bea650eeccaf45cf59ef3727 /arch/arm/mach-exynos4/dev-tmu.c
parentec5237f097a75b7f4d19b87377ef1557431fb199 (diff)
parente82b9d821ecc1f857142a55b0fb38d0d5256fbaf (diff)
Merge branch 'thermal_cpu_cooling' of git://git.linaro.org/people/amitdanielk/linux into linaro-3.1linux-linaro-3.1-2011.12-0
Conflicts: drivers/thermal/Kconfig drivers/thermal/Makefile
Diffstat (limited to 'arch/arm/mach-exynos4/dev-tmu.c')
-rw-r--r--arch/arm/mach-exynos4/dev-tmu.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/dev-tmu.c b/arch/arm/mach-exynos4/dev-tmu.c
new file mode 100644
index 00000000000..c1e9e9648b6
--- /dev/null
+++ b/arch/arm/mach-exynos4/dev-tmu.c
@@ -0,0 +1,68 @@
+/* linux/arch/arm/mach-exynos4/dev-tmu.c
+ *
+ * Copyright 2011 by SAMSUNG
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+#include <linux/platform_data/exynos4_tmu.h>
+#include <asm/irq.h>
+
+#include <mach/irqs.h>
+#include <mach/map.h>
+#include <plat/devs.h>
+
+static struct resource exynos4_tmu_resource[] = {
+ [0] = {
+ .start = EXYNOS4_PA_TMU,
+ .end = EXYNOS4_PA_TMU + 0xFFFF - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = IRQ_TMU_TRIG0,
+ .end = IRQ_TMU_TRIG0,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct exynos4_tmu_platform_data default_tmu_data = {
+ .threshold = 55,
+ .trigger_levels[0] = 0xFF,
+ .trigger_levels[1] = 5,
+ .trigger_levels[2] = 20,
+ .trigger_levels[3] = 30,
+ .trigger_level0_en = 0,
+ .trigger_level1_en = 1,
+ .trigger_level2_en = 1,
+ .trigger_level3_en = 1,
+ .gain = 15,
+ .reference_voltage = 7,
+ .cal_type = TYPE_ONE_POINT_TRIMMING,
+ .freq_tab[0] = {
+ .freq_clip_pctg[0] = 50,
+ },
+ .freq_tab[1] = {
+ .freq_clip_pctg[0] = 99,
+ },
+ .freq_tab[2] = {
+ .freq_clip_pctg[0] = 99,
+ },
+ .level_count = 3,
+};
+
+struct platform_device exynos4_device_tmu = {
+ .name = "exynos4-tmu",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(exynos4_tmu_resource),
+ .resource = exynos4_tmu_resource,
+ .dev = {
+ .platform_data = &default_tmu_data,
+ },
+};
+EXPORT_SYMBOL(exynos4_device_tmu);