platform-drivers: msm: tsens: Add TSENS support for MDM9x15

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-9615.c
	arch/arm/mach-msm/devices-9615.c
diff --git a/arch/arm/mach-msm/board-9615.c b/arch/arm/mach-msm/board-9615.c
index 297b686..d60b6ca 100644
--- a/arch/arm/mach-msm/board-9615.c
+++ b/arch/arm/mach-msm/board-9615.c
@@ -32,6 +32,7 @@
 	&msm9615_device_qup_i2c_gsbi5,
 	&msm9615_device_qup_spi_gsbi3,
 	&msm_device_sps,
+	&msm9615_device_tsens,
 };
 
 static struct pm8xxx_irq_platform_data pm8xxx_irq_pdata __devinitdata = {
diff --git a/arch/arm/mach-msm/devices-9615.c b/arch/arm/mach-msm/devices-9615.c
index 0277f28..4972585 100644
--- a/arch/arm/mach-msm/devices-9615.c
+++ b/arch/arm/mach-msm/devices-9615.c
@@ -15,6 +15,7 @@
 #include <linux/platform_device.h>
 #include <linux/irq.h>
 #include <linux/io.h>
+#include <linux/msm_tsens.h>
 #include <asm/hardware/gic.h>
 #include <mach/board.h>
 #include <mach/msm_iomap.h>
@@ -199,6 +200,21 @@
 	.dev.platform_data = &msm_sps_pdata,
 };
 
+static struct tsens_platform_data msm_tsens_pdata = {
+	.slope			= 910,
+	.tsens_factor		= 1000,
+	.hw_type		= MSM_9615,
+	.tsens_num_sensor	= 5,
+};
+
+struct platform_device	msm9615_device_tsens = {
+	.name		= "tsens8960-tm",
+	.id		= -1,
+	.dev		= {
+			.platform_data = &msm_tsens_pdata,
+	},
+};
+
 #ifdef CONFIG_CACHE_L2X0
 static int __init l2x0_cache_init(void)
 {
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index 1ab614c..b4697ce 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -71,6 +71,7 @@
 extern struct platform_device msm9615_device_qup_i2c_gsbi5;
 extern struct platform_device msm9615_device_qup_spi_gsbi3;
 extern struct platform_device msm9615_device_ssbi_pmic1;
+extern struct platform_device msm9615_device_tsens;
 
 extern struct platform_device msm_device_sdc1;
 extern struct platform_device msm_device_sdc2;
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-9615.h b/arch/arm/mach-msm/include/mach/msm_iomap-9615.h
index 446adea..bbc25fd 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-9615.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-9615.h
@@ -80,4 +80,7 @@
 #define MSM9615_HSUSB_PHYS		0x12500000
 #define MSM9615_HSUSB_SIZE		SZ_4K
 
+#define MSM9615_QFPROM_PHYS		0x00700000
+#define MSM9615_QFPROM_SIZE		SZ_4K
+
 #endif
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 794ef2b..9137e08 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -332,6 +332,7 @@
 		.length =   MSM_SHARED_RAM_SIZE,
 		.type =     MT_DEVICE,
 	},
+	MSM_CHIP_DEVICE(QFPROM, MSM9615),
 };
 
 void __init msm_map_msm9615_io(void)