msm: camera: Fix for setting gpio states used by ov7692

The gpios 35 & 40 are shared by camera sensors & lcd display.
The generic gpio config functions disable the gpios during
camera power down if specified through the normal gpio table
array. These gpios need to be handled differently.

Change-Id: I43dd915e5467372ba5b15a535dcb8d2ce7c78c2f
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm7627a-camera.c b/arch/arm/mach-msm/board-msm7627a-camera.c
index 329dcae..c069aab 100644
--- a/arch/arm/mach-msm/board-msm7627a-camera.c
+++ b/arch/arm/mach-msm/board-msm7627a-camera.c
@@ -86,8 +86,6 @@
 	{GPIO_SKU1_CAM_VGA_SHDN, GPIOF_OUT_INIT_LOW, 5000},
 	{GPIO_SKU1_CAM_VGA_RESET_N, GPIOF_OUT_INIT_HIGH, 5000},
 	{GPIO_SKU1_CAM_VGA_RESET_N, GPIOF_OUT_INIT_LOW, 5000},
-	{40, GPIOF_OUT_INIT_HIGH, 5000},
-	{35, GPIOF_OUT_INIT_HIGH, 5000},
 };
 
 static struct msm_camera_gpio_conf gpio_conf_ov7692 = {
@@ -212,6 +210,7 @@
 	.sensor_name	    = "ov7692",
 	.sensor_reset_enable    = 0,
 	.pmic_gpio_enable  = 1,
+	.sensor_lcd_gpio_onoff = lcd_camera_power_onoff,
 	.sensor_reset	   = GPIO_SKU1_CAM_VGA_RESET_N,
 	.sensor_pwd	     = GPIO_SKU1_CAM_VGA_SHDN,
 	.pdata			= &msm_camera_device_data_csi0[0],
@@ -255,6 +254,7 @@
 	.sensor_name    = "ov5647",
 	.sensor_reset_enable = 1,
 	.pmic_gpio_enable  = 1,
+	.sensor_lcd_gpio_onoff = lcd_camera_power_onoff,
 	.sensor_reset   = GPIO_SKU3_CAM_5MP_CAMIF_RESET,
 	.sensor_pwd     = GPIO_SKU3_CAM_5MP_SHDN_N,
 	.pdata          = &msm_camera_device_data_csi1[0],
@@ -1099,8 +1099,6 @@
 			GPIO_SKU7_CAM_VGA_SHDN;
 		ov7692_cam_gpio_set_tbl[0].gpio = GPIO_SKU7_CAM_VGA_SHDN;
 		ov7692_cam_gpio_set_tbl[1].gpio = GPIO_SKU7_CAM_VGA_SHDN;
-		ov7692_cam_gpio_set_tbl[4].gpio = LCD_CAMERA_LDO_2V8 ;
-		ov7692_cam_gpio_set_tbl[5].gpio = SKU7_LCD_CAMERA_LDO_1V8;
 
 		msm_camera_sensor_ov5647_data.sensor_pwd =
 			GPIO_SKU7_CAM_5MP_SHDN_N;
diff --git a/arch/arm/mach-msm/board-msm7627a.h b/arch/arm/mach-msm/board-msm7627a.h
index 413a28c..4357e01 100644
--- a/arch/arm/mach-msm/board-msm7627a.h
+++ b/arch/arm/mach-msm/board-msm7627a.h
@@ -103,6 +103,7 @@
 #endif
 
 void __init msm7627a_camera_init(void);
+int lcd_camera_power_onoff(int on);
 
 void __init msm7627a_add_io_devices(void);
 void __init qrd7627a_add_io_devices(void);
diff --git a/arch/arm/mach-msm/include/mach/board.h b/arch/arm/mach-msm/include/mach/board.h
index 644746e..56210d5 100644
--- a/arch/arm/mach-msm/include/mach/board.h
+++ b/arch/arm/mach-msm/include/mach/board.h
@@ -288,6 +288,7 @@
 	enum msm_sensor_type sensor_type;
 	struct msm_actuator_info *actuator_info;
 	int pmic_gpio_enable;
+	int (*sensor_lcd_gpio_onoff)(int on);
 	struct msm_eeprom_info *eeprom_info;
 };