Revert "[display-dv20]: turn off panel power rail only if no operation exists"
authorGeng Xiujun <xiujun.geng@intel.com>
Fri, 27 Apr 2012 01:09:22 +0000 (09:09 +0800)
committerProtat, RemyX <remyx.protat@intel.com>
Thu, 3 May 2012 13:48:31 +0000 (06:48 -0700)
BZ: 32593

This reverts commit 9e1f4398b6b3d9155fa9df0763bc29bb73d7a2f6.

Change-Id: I9f68607f9a387b4d449b65bf8aa6906f84a288f3
Signed-off-by: Remy Protat <remyx.protat@intel.com>
Reviewed-on: http://android.intel.com:8080/47238

drivers/staging/mrst/drv/mdfld_dsi_lvds_bridge.c
drivers/staging/mrst/drv/mdfld_dsi_lvds_bridge.h
drivers/staging/mrst/drv/psb_drv.c

index 38626b5..6b79002 100644 (file)
@@ -334,6 +334,7 @@ static int tc35876x_bridge_remove(struct i2c_client *client)
        return 0;
 }
 
+
 static const struct i2c_device_id tc35876x_bridge_id[] = {
        { "i2c_disp_brig", 0 },
        { }
@@ -539,6 +540,9 @@ void dsi_lvds_toshiba_bridge_panel_off(void)
        if (gpio_direction_output(GPIO_MIPI_LCD_BL_EN, 0))
                gpio_set_value_cansleep(GPIO_MIPI_LCD_BL_EN, 0);
        mdelay(1);
+
+       if (gpio_direction_output(GPIO_MIPI_LCD_VADD, 0))
+               gpio_set_value_cansleep(GPIO_MIPI_LCD_VADD, 0);
 }
 
 /* ************************************************************************* *\
@@ -552,6 +556,10 @@ void dsi_lvds_toshiba_bridge_panel_on(struct drm_device *dev)
 
        printk(KERN_INFO "[DISPLAY ] %s\n", __func__);
 
+       if (gpio_direction_output(GPIO_MIPI_LCD_VADD, 1))
+               gpio_set_value_cansleep(GPIO_MIPI_LCD_VADD, 1);
+       msleep(260);
+
        if (cmi_lcd_i2c_client) {
                int ret;
                PSB_DEBUG_ENTRY("setting TCON\n");
@@ -606,27 +614,6 @@ void dsi_lvds_toshiba_bridge_panel_on(struct drm_device *dev)
                        dev_priv->brightness_adjusted);
 }
 
-/*
- * Turn off/on power of LVDS panel only if no device is active
- */
-int tc35876x_lvds_panel_suspend_noirq(struct device *dev)
-{
-       if (gpio_direction_output(GPIO_MIPI_LCD_VADD, 0))
-               gpio_set_value_cansleep(GPIO_MIPI_LCD_VADD, 0);
-       mdelay(1);
-
-       return 0;
-}
-
-int tc35876x_lvds_panel_resume_noirq(struct device *dev)
-{
-       if (gpio_direction_output(GPIO_MIPI_LCD_VADD, 1))
-               gpio_set_value_cansleep(GPIO_MIPI_LCD_VADD, 1);
-       msleep(260);
-
-       return 0;
-}
-
 /* ************************************************************************* *\
  * FUNCTION: dsi_lvds_init_lvds_bridge
  *
index ae50941..9c18efa 100644 (file)
@@ -68,7 +68,5 @@ void dsi_lvds_deinit_lvds_bridge(struct drm_device *dev);
 void dsi_lvds_bridge_get_display_params(struct drm_display_mode *mode);
 void dsi_lvds_resume_lvds_bridge(struct drm_device *dev);
 void dsi_lvds_suspend_lvds_bridge(struct drm_device *dev);
-int tc35876x_lvds_panel_resume_noirq(struct device *dev);
-int tc35876x_lvds_panel_suspend_noirq(struct device *dev);
 
 #endif /*__MDFLD_DSI_LVDS_BRIDGE_H__*/
index eb1eef8..43024ed 100644 (file)
@@ -37,7 +37,6 @@
 #include <linux/cpu.h>
 #include <linux/notifier.h>
 #include <linux/spinlock.h>
-#include "mdfld_dsi_lvds_bridge.h"
 #ifdef CONFIG_GFX_RTPM
 #include <linux/pm_runtime.h>
 #endif
@@ -3871,10 +3870,6 @@ static const struct dev_pm_ops psb_pm_ops = {
        .runtime_idle = psb_runtime_idle,
        .suspend = psb_runtime_suspend,
        .resume = psb_runtime_resume,
-#ifdef CONFIG_SUPPORT_TOSHIBA_MIPI_LVDS_BRIDGE
-       .suspend_noirq = tc35876x_lvds_panel_suspend_noirq,
-       .resume_noirq = tc35876x_lvds_panel_resume_noirq,
-#endif
 };
 
 static struct drm_driver driver = {