mdm9615: Add calibration data for TSENS
MDM9615 has identical configuration for the number
of sensors and slope with MSM8960. Add support to
enable the TSENS for calibrated parts.
Change-Id: Ieb1f118ce916ab5a4f079b18b11541d86c3a5560
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-9615.c b/arch/arm/mach-msm/board-9615.c
index a557764..8fe55ff 100644
--- a/arch/arm/mach-msm/board-9615.c
+++ b/arch/arm/mach-msm/board-9615.c
@@ -23,6 +23,7 @@
#include <linux/leds.h>
#include <linux/leds-pm8xxx.h>
#include <linux/power/ltc4088-charger.h>
+#include <linux/msm_tsens.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/hardware/gic.h>
@@ -508,6 +509,13 @@
};
#endif
+static struct tsens_platform_data msm_tsens_pdata = {
+ .tsens_factor = 1000,
+ .hw_type = MDM_9615,
+ .tsens_num_sensor = 5,
+ .slope = {1176, 1176, 1154, 1176, 1111},
+};
+
static struct platform_device *common_devices[] = {
&msm9615_device_dmov,
&msm_device_smd,
@@ -530,7 +538,6 @@
&msm9615_device_qup_spi_gsbi3,
&msm_device_sps,
&msm9615_slim_ctrl,
- &msm9615_device_tsens,
&msm_device_nand,
&msm_device_bam_dmux,
&msm9615_rpm_device,
@@ -599,6 +606,7 @@
msm_cpuidle_set_states(msm_cstates, ARRAY_SIZE(msm_cstates),
msm_pm_data);
BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
+ msm_tsens_early_init(&msm_tsens_pdata);
}
static void __init msm9615_cdp_init(void)
diff --git a/arch/arm/mach-msm/devices-9615.c b/arch/arm/mach-msm/devices-9615.c
index 28dceb0..8894b4b 100644
--- a/arch/arm/mach-msm/devices-9615.c
+++ b/arch/arm/mach-msm/devices-9615.c
@@ -15,7 +15,6 @@
#include <linux/platform_device.h>
#include <linux/irq.h>
#include <linux/io.h>
-#include <linux/msm_tsens.h>
#include <linux/platform_data/qcom_crypto_device.h>
#include <linux/dma-mapping.h>
#include <asm/hardware/gic.h>
@@ -442,21 +441,6 @@
.dev.platform_data = &msm_sps_pdata,
};
-static struct tsens_platform_data msm_tsens_pdata = {
- .slope = {872, 872, 872, 872, 872},
- .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,
- },
-};
-
#define MSM_NAND_PHYS 0x1B400000
static struct resource resources_nand[] = {
[0] = {