arm: tegra: enterprise: Turn LCD_RESET low in display off
Karthik Ramakrishnan [Fri, 15 Jun 2012 00:57:27 +0000 (17:57 -0700)]
During early suspend, LCD_RESET output needs to be
turned low. 3mW power savings during display Off and
1mW on lp0.
Bug 969716
Bug 990845

Change-Id: Ia773f0411452fad3eddccb5f293d7f32c4a46a56
signed-off-by: Karthik Ramakrishnan <karthikr@nvidia.com>
(cherry picked from commit 87322ed7e125ae1ac8d05b623c66f6ab7ea40881)
Reviewed-on: http://git-master/r/114057
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/board-enterprise-panel.c

index 837635b..00b8b29 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/arm/mach-tegra/board-enterprise-panel.c
  *
- * Copyright (c) 2011-2012, NVIDIA Corporation.
+ * Copyright (c) 2011-2012, NVIDIA CORPORATION. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -554,16 +554,13 @@ static int enterprise_dsi_panel_enable(void)
                }
        }
 
-       if (kernel_1st_panel_init != true) {
+       if (kernel_1st_panel_init == true) {
                ret = gpio_request(enterprise_dsi_panel_reset, "panel reset");
                if (ret < 0)
                        return ret;
-
-               ret = gpio_direction_output(enterprise_dsi_panel_reset, 0);
-               if (ret < 0) {
-                       gpio_free(enterprise_dsi_panel_reset);
-                       return ret;
-               }
+               kernel_1st_panel_init = false;
+       } else {
+               gpio_direction_output(enterprise_dsi_panel_reset, 0);
 
                gpio_set_value(enterprise_dsi_panel_reset, 0);
                udelay(2000);
@@ -581,10 +578,7 @@ static int enterprise_dsi_panel_disable(void)
                regulator_disable(enterprise_lcd_reg);
 
 #if DSI_PANEL_RESET
-       if (kernel_1st_panel_init != true) {
-               gpio_free(enterprise_dsi_panel_reset);
-       } else
-               kernel_1st_panel_init = false;
+       gpio_direction_output(enterprise_dsi_panel_reset, 0);
 #endif
        return 0;
 }