summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Chen <frankc@nvidia.com>2011-08-24 18:04:52 -0700
committerRohan Somvanshi <rsomvanshi@nvidia.com>2011-08-30 04:27:17 -0700
commit25625444e148936a57f304e63024e7cb8cf4afb3 (patch)
treee496db428236f4df2fc3bdf9d27e1124a1288c59
parented2d44a1fc1fef35240b264beaec09d50202bd21 (diff)
arm: tegra: PM269: Fix focuser I2C timeout issue.
Fix regulator_get error and reset the sensor/focuser properly in the camera power on routine for PM269. Bug 842713 Change-Id: Ia3820ec9e7bcca850b090a48963606af855f5ad2 Reviewed-on: http://git-master/r/49101 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/board-cardhu-power.c2
-rw-r--r--arch/arm/mach-tegra/board-cardhu-sensors.c14
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-power.c b/arch/arm/mach-tegra/board-cardhu-power.c
index caaaa95cbca9..cec76d1acada 100644
--- a/arch/arm/mach-tegra/board-cardhu-power.c
+++ b/arch/arm/mach-tegra/board-cardhu-power.c
@@ -802,6 +802,8 @@ GREG_INIT(22, en_vbrtr, en_vbrtr, "vdd_3v3_devices", 0, 0, PMU_TCA641
ADD_GPIO_REG(en_3v3_sys), \
ADD_GPIO_REG(en_3v3_modem), \
ADD_GPIO_REG(en_vdd_pnl1_pm269), \
+ ADD_GPIO_REG(cam1_ldo_en), \
+ ADD_GPIO_REG(cam2_ldo_en), \
ADD_GPIO_REG(cam3_ldo_en), \
ADD_GPIO_REG(en_vdd_com), \
ADD_GPIO_REG(en_3v3_fuse_pm269), \
diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c
index c3ef960d673d..d0b72958d50a 100644
--- a/arch/arm/mach-tegra/board-cardhu-sensors.c
+++ b/arch/arm/mach-tegra/board-cardhu-sensors.c
@@ -171,6 +171,13 @@ static int cardhu_left_ov5650_power_on(void)
mdelay(100);
gpio_direction_output(OV5650_RESETN_GPIO, 1);
}
+
+ if (board_info.board_id == BOARD_PM269) {
+ gpio_direction_output(CAM1_RST_L_GPIO, 0);
+ mdelay(100);
+ gpio_direction_output(CAM1_RST_L_GPIO, 1);
+ }
+
return 0;
reg_alloc_fail:
@@ -245,6 +252,13 @@ static int cardhu_right_ov5650_power_on(void)
regulator_enable(cardhu_1v8_cam2);
mdelay(5);
+
+ if (board_info.board_id == BOARD_PM269) {
+ gpio_direction_output(CAM2_RST_L_GPIO, 0);
+ mdelay(100);
+ gpio_direction_output(CAM2_RST_L_GPIO, 1);
+ }
+
return 0;
reg_alloc_fail: