msm: Enable msm_adc for 7x27a/8x25

The msm_adc interface is used to read the HKADC from the
remote processor. It uses the DALRPC layer to communicate
to the remote HKADC driver.

Add support to read PMIC Thermistor from the HKADC to support
thermal clients on the apps. PMIC temperature is one of the
thermal nodes used for performing thermal mitigation.

Change-Id: I9d9e8178e19daf5d830588281855dd8a40de1f0d
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm7x27a.c b/arch/arm/mach-msm/board-msm7x27a.c
index 5b60af0..c3650fa 100644
--- a/arch/arm/mach-msm/board-msm7x27a.c
+++ b/arch/arm/mach-msm/board-msm7x27a.c
@@ -49,6 +49,7 @@
 #include <linux/smsc911x.h>
 #include <linux/atmel_maxtouch.h>
 #include <linux/fmem.h>
+#include <linux/msm_adc.h>
 #include "devices.h"
 #include "timer.h"
 #include "board-msm7x27a-regulator.h"
@@ -712,6 +713,24 @@
 							 "eth_fifo_sel" },
 };
 
+static char *msm_adc_surf_device_names[] = {
+	"XO_ADC",
+};
+
+static struct msm_adc_platform_data msm_adc_pdata = {
+	.dev_names = msm_adc_surf_device_names,
+	.num_adc = ARRAY_SIZE(msm_adc_surf_device_names),
+	.target_hw = MSM_8x25,
+};
+
+static struct platform_device msm_adc_device = {
+	.name   = "msm_adc",
+	.id = -1,
+	.dev = {
+		.platform_data = &msm_adc_pdata,
+	},
+};
+
 #define ETH_FIFO_SEL_GPIO	49
 static void msm7x27a_cfg_smsc911x(void)
 {
@@ -814,6 +833,7 @@
 	&asoc_msm_dai0,
 	&asoc_msm_dai1,
 	&msm_batt_device,
+	&msm_adc_device,
 };
 
 static struct platform_device *msm8625_surf_devices[] __initdata = {