diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-sensors.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-sensors.c | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c index bb6a2ae5774d..7e9774f290eb 100644 --- a/arch/arm/mach-tegra/board-cardhu-sensors.c +++ b/arch/arm/mach-tegra/board-cardhu-sensors.c @@ -340,7 +340,7 @@ static int cardhu_right_ov5650_power_off(void) gpio_direction_output(CAMERA_CSI_MUX_SEL_GPIO, 0); /* Boards E1198 and E1291 are of Cardhu personality - * and donot have TCA6416 exp for camera */ + * and do not have TCA6416 for camera */ if ((board_info.board_id == BOARD_E1198) || (board_info.board_id == BOARD_E1291)) { gpio_direction_output(CAM1_POWER_DWN_GPIO, 1); @@ -387,16 +387,21 @@ static int cardhu_ov2710_power_on(void) /* CSI-B and front sensor are muxed on cardhu */ gpio_direction_output(CAMERA_CSI_MUX_SEL_GPIO, 1); + /* Enable VDD_1V8_Cam3 */ + if (cardhu_1v8_cam3 == NULL) { + cardhu_1v8_cam3 = regulator_get(NULL, "vdd_1v8_cam3"); + if (WARN_ON(IS_ERR(cardhu_1v8_cam3))) { + pr_err("%s: couldn't get regulator vdd_1v8_cam3: %ld\n", + __func__, PTR_ERR(cardhu_1v8_cam3)); + goto reg_alloc_fail; + } + } + regulator_enable(cardhu_1v8_cam3); + /* Boards E1198 and E1291 are of Cardhu personality - * and donot have TCA6416 exp for camera */ + * and do not have TCA6416 for camera */ if ((board_info.board_id == BOARD_E1198) || (board_info.board_id == BOARD_E1291)) { - - gpio_direction_output(CAM1_POWER_DWN_GPIO, 0); - gpio_direction_output(CAM2_POWER_DWN_GPIO, 0); - gpio_direction_output(CAM3_POWER_DWN_GPIO, 0); - mdelay(10); - if (cardhu_vdd_cam3 == NULL) { cardhu_vdd_cam3 = regulator_get(NULL, "vdd_cam3"); if (WARN_ON(IS_ERR(cardhu_vdd_cam3))) { @@ -406,19 +411,17 @@ static int cardhu_ov2710_power_on(void) } } regulator_enable(cardhu_vdd_cam3); - } - /* Enable VDD_1V8_Cam3 */ - if (cardhu_1v8_cam3 == NULL) { - cardhu_1v8_cam3 = regulator_get(NULL, "vdd_1v8_cam3"); - if (WARN_ON(IS_ERR(cardhu_1v8_cam3))) { - pr_err("%s: couldn't get regulator vdd_1v8_cam3: %ld\n", - __func__, PTR_ERR(cardhu_1v8_cam3)); - goto reg_alloc_fail; - } + mdelay(5); + + gpio_direction_output(CAM1_POWER_DWN_GPIO, 0); + gpio_direction_output(CAM2_POWER_DWN_GPIO, 0); + gpio_direction_output(CAM3_POWER_DWN_GPIO, 0); + mdelay(10); + } - regulator_enable(cardhu_1v8_cam3); - mdelay(5); + + mdelay(20); return 0; @@ -447,12 +450,12 @@ static int cardhu_ov2710_power_off(void) gpio_direction_output(CAM1_POWER_DWN_GPIO, 1); gpio_direction_output(CAM2_POWER_DWN_GPIO, 1); gpio_direction_output(CAM3_POWER_DWN_GPIO, 1); + if (cardhu_vdd_cam3) + regulator_disable(cardhu_vdd_cam3); } if (cardhu_1v8_cam3) regulator_disable(cardhu_1v8_cam3); - if (cardhu_vdd_cam3) - regulator_disable(cardhu_vdd_cam3); return 0; } |