msm: camera: Fix camera switch issue

Reset CSI1 clock branches at the time of VFE_RESET to
get START_ACK from VFE block to avoid camera switch
issue from front to back.

Change-Id: I3b097e748544c28450ca772b08e8aa43eca8f769
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm7627a-camera.c b/arch/arm/mach-msm/board-msm7627a-camera.c
index 94b8710..12cd5af 100644
--- a/arch/arm/mach-msm/board-msm7627a-camera.c
+++ b/arch/arm/mach-msm/board-msm7627a-camera.c
@@ -309,6 +309,8 @@
 		platform_device_register(&msm7x27a_device_csic0);
 		platform_device_register(&msm7x27a_device_csic1);
 	}
+	if (machine_is_msm8625_evb())
+		*(int *) msm7x27a_device_clkctl.dev.platform_data = 1;
 	platform_device_register(&msm7x27a_device_clkctl);
 	platform_device_register(&msm7x27a_device_vfe);
 }
diff --git a/arch/arm/mach-msm/devices-msm7x27a.c b/arch/arm/mach-msm/devices-msm7x27a.c
index 917500c..1391981 100644
--- a/arch/arm/mach-msm/devices-msm7x27a.c
+++ b/arch/arm/mach-msm/devices-msm7x27a.c
@@ -608,6 +608,7 @@
 };
 
 #ifdef CONFIG_MSM_CAMERA_V4L2
+static int apps_reset;
 static struct resource msm_csic0_resources[] = {
 	{
 		.name   = "csic",
@@ -665,6 +666,9 @@
 	.id             = 0,
 	.resource       = msm_clkctl_resources,
 	.num_resources  = ARRAY_SIZE(msm_clkctl_resources),
+	.dev = {
+		.platform_data = &apps_reset,
+	},
 };
 
 struct platform_device msm7x27a_device_vfe = {
diff --git a/arch/arm/mach-msm/include/mach/camera.h b/arch/arm/mach-msm/include/mach/camera.h
index 5ee9e1a..8451f78 100644
--- a/arch/arm/mach-msm/include/mach/camera.h
+++ b/arch/arm/mach-msm/include/mach/camera.h
@@ -657,6 +657,7 @@
 void msm_camio_camif_pad_reg_reset_2(void);
 
 void msm_camio_vfe_blk_reset(void);
+void msm_camio_vfe_blk_reset_2(int flag);
 
 int32_t msm_camio_3d_enable(const struct msm_camera_sensor_info *sinfo);
 void msm_camio_3d_disable(void);