Revert "arm: tegra: cardhu: Setting the gpio pins properly."
Jin Qian [Tue, 10 May 2011 18:16:18 +0000 (11:16 -0700)]
Original change breaks LP1 on t30.

This reverts commit 522f94b14b99c47322a72012fb5ce9a59c145630.

Original-Change-Id: Ia3aacc5924987828aa0fd1e2c6ccc3c990b871c0
Reviewed-on: http://git-master/r/31023
Tested-by: Jin Qian <jqian@nvidia.com>
Reviewed-by: Narendra Damahe <ndamahe@nvidia.com>
Tested-by: Narendra Damahe <ndamahe@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

Rebase-Id: Rfaa8c9a8b179ed7163095d29bdde24ec2f93b2d3

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

index 4a42df7..8fca8ea 100644 (file)
@@ -190,6 +190,8 @@ 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);
@@ -210,15 +212,13 @@ 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)
-               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);
-
        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);
+               mdelay(10);
+
                if (cardhu_vdd_2v8_cam2 == NULL) {
                        cardhu_vdd_2v8_cam2 = regulator_get(NULL, "vdd_2v8_cam2");
                        if (WARN_ON(IS_ERR(cardhu_vdd_2v8_cam2))) {
@@ -278,10 +278,11 @@ 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)
+       if ((board_info.board_id == BOARD_E1198) ||
+               (board_info.board_id == BOARD_E1291)) {
                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);
@@ -308,6 +309,9 @@ 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);
 
@@ -366,13 +370,16 @@ reg_alloc_fail:
 
 static int cardhu_ov2710_power_off(void)
 {
-       gpio_direction_output(CAMERA_CSI_MUX_SEL_GPIO, 0);
+       gpio_direction_output(CAMERA_CSI_MUX_SEL_GPIO, 1);
 
        /* 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))
+               (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_cam3)
                regulator_disable(cardhu_1v8_cam3);