diff options
author | Abhiruchi Birajdar <abirajdar@nvidia.com> | 2011-05-03 18:48:30 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-05-05 14:18:43 -0700 |
commit | 522f94b14b99c47322a72012fb5ce9a59c145630 (patch) | |
tree | 41f8c6a82786d8a930003b072ef771e15390755a /arch/arm/mach-tegra | |
parent | cec8599e9108105058572824c8eed3714369dac1 (diff) |
arm: tegra: cardhu: Setting the gpio pins properly.
The gpio power down pins for rear and front camera are
properly set depending on the board type.
Bug 821048
Change-Id: Ibf265bc79b582d9ed4c4cc0d1a864a5c68b05835
Reviewed-on: http://git-master/r/30213
Tested-by: Abhiruchi Birajdar <abirajdar@nvidia.com>
Reviewed-by: Prayas Mohanty <pmohanty@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: John Sasinowski <jsasinowski@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Danielle Sun <dsun@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-sensors.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c index 10fdd8d3c568..c2e68a3dd066 100644 --- a/arch/arm/mach-tegra/board-cardhu-sensors.c +++ b/arch/arm/mach-tegra/board-cardhu-sensors.c @@ -190,8 +190,6 @@ static int cardhu_left_ov5650_power_off(void) if ((board_info.board_id == BOARD_E1198) || (board_info.board_id == BOARD_E1291)) { 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_1v8_cam1) regulator_disable(cardhu_1v8_cam1); @@ -212,12 +210,14 @@ static int cardhu_right_ov5650_power_on(void) { /* Boards E1198 and E1291 are of Cardhu personality * and donot have TCA6416 exp for camera */ - if ((board_info.board_id == BOARD_E1198) || - (board_info.board_id == BOARD_E1291)) { - + if (board_info.board_id == BOARD_E1198) gpio_direction_output(CAM1_POWER_DWN_GPIO, 0); + if (board_info.board_id == BOARD_E1291) gpio_direction_output(CAM2_POWER_DWN_GPIO, 0); - mdelay(10); + mdelay(10); + + if ((board_info.board_id == BOARD_E1198) || + (board_info.board_id == BOARD_E1291)) { if (cardhu_vdd_2v8_cam2 == NULL) { cardhu_vdd_2v8_cam2 = regulator_get(NULL, "vdd_2v8_cam2"); @@ -278,11 +278,10 @@ static int cardhu_right_ov5650_power_off(void) { /* Boards E1198 and E1291 are of Cardhu personality * and donot have TCA6416 exp for camera */ - if ((board_info.board_id == BOARD_E1198) || - (board_info.board_id == BOARD_E1291)) { + if (board_info.board_id == BOARD_E1198) gpio_direction_output(CAM1_POWER_DWN_GPIO, 1); + if (board_info.board_id == BOARD_E1291) gpio_direction_output(CAM2_POWER_DWN_GPIO, 1); - } if (cardhu_1v8_cam2) regulator_disable(cardhu_1v8_cam2); @@ -309,9 +308,6 @@ static int cardhu_ov2710_power_on(void) * and donot have TCA6416 exp 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); @@ -370,16 +366,13 @@ reg_alloc_fail: static int cardhu_ov2710_power_off(void) { - gpio_direction_output(CAMERA_CSI_MUX_SEL_GPIO, 1); + gpio_direction_output(CAMERA_CSI_MUX_SEL_GPIO, 0); /* Boards E1198 and E1291 are of Cardhu personality * and donot have TCA6416 exp for camera */ if ((board_info.board_id == BOARD_E1198) || - (board_info.board_id == BOARD_E1291)) { - gpio_direction_output(CAM1_POWER_DWN_GPIO, 1); - gpio_direction_output(CAM2_POWER_DWN_GPIO, 1); + (board_info.board_id == BOARD_E1291)) gpio_direction_output(CAM3_POWER_DWN_GPIO, 1); - } if (cardhu_1v8_cam3) regulator_disable(cardhu_1v8_cam3); |