arm: tegra: PM269: Fix focuser I2C timeout issue.
Frank Chen [Thu, 25 Aug 2011 01:04:52 +0000 (18:04 -0700)]
Fix regulator_get error and reset the sensor/focuser properly
in the camera power on routine for PM269.

Bug 842713

Original-Change-Id: Ia3820ec9e7bcca850b090a48963606af855f5ad2
Reviewed-on: http://git-master/r/49101
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Rebase-Id: R5623445c753a3e8ffaaef38a5b105c8330e21b49

arch/arm/mach-tegra/board-cardhu-power.c
arch/arm/mach-tegra/board-cardhu-sensors.c

index c0e6f6e..7f2a0dc 100644 (file)
@@ -798,6 +798,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),        \
index c3ef960..d0b7295 100644 (file)
@@ -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: