Gfx-display: correct sleep function usage for DVx
authorGeng Xiujun <xiujun.geng@intel.com>
Thu, 17 May 2012 02:44:34 +0000 (10:44 +0800)
committerbuildbot <buildbot@intel.com>
Wed, 23 May 2012 13:23:21 +0000 (06:23 -0700)
BZ: 36765

use usleep_range instead of mdelay and msleep for short time delay.

Change-Id: Ic9b1bb246e555d8817d87f4d25347bcf0a9f7049
Signed-off-by: Geng Xiujun <xiujun.geng@intel.com>
Reviewed-on: http://android.intel.com:8080/49126
Reviewed-by: Hogander, Jouni <jouni.hogander@intel.com>
Reviewed-by: Xu, Randy <randy.xu@intel.com>
Tested-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: Imberton, Guilhem <guilhem.imberton@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/mrst/drv/mdfld_dsi_lvds_bridge.c

index 6abb375..3112641 100644 (file)
@@ -362,7 +362,7 @@ void dsi_lvds_suspend_lvds_bridge(struct drm_device *dev)
 
        if (gpio_direction_output(GPIO_MIPI_BRIDGE_RESET, 0))
                gpio_set_value_cansleep(GPIO_MIPI_BRIDGE_RESET, 0);
-       msleep(10);
+       usleep_range(500, 1000);
 
        lvds_suspend_state = true;
 }
@@ -388,15 +388,15 @@ void dsi_lvds_resume_lvds_bridge(struct drm_device *dev)
        /* RESET */
        if (gpio_direction_output(GPIO_MIPI_BRIDGE_RESET, 1))
                gpio_set_value_cansleep(GPIO_MIPI_BRIDGE_RESET, 1);
-       msleep(20);
+       usleep_range(500, 1000);
 
        if (gpio_direction_output(GPIO_MIPI_BRIDGE_RESET, 0))
                gpio_set_value_cansleep(GPIO_MIPI_BRIDGE_RESET, 0);
-       msleep(20);
+       usleep_range(500, 1000);
 
        if (gpio_direction_output(GPIO_MIPI_BRIDGE_RESET, 1))
                gpio_set_value_cansleep(GPIO_MIPI_BRIDGE_RESET, 1);
-       msleep(20);
+       usleep_range(500, 1000);
 
        lvds_suspend_state = false;
 }
@@ -415,17 +415,17 @@ void dsi_lvds_set_bridge_reset_state(int state)
                        gpio_set_value_cansleep(GPIO_MIPI_BRIDGE_RESET, 0);
                /* FIXME:
                 * per spec, the min period of reset signal is 50 nano secs,
-                * but no detailed description. Here delay 1ms for safe.
+                * but no detailed description. Here wait 0.5~1ms for safe.
                 */
-               mdelay(1);
+               usleep_range(500, 1000);
        } else {
 
                if (gpio_direction_output(GPIO_MIPI_BRIDGE_RESET, 0))
                        gpio_set_value_cansleep(GPIO_MIPI_BRIDGE_RESET, 0);  /*Pull MIPI Bridge reset pin to Low */
-               mdelay(1);
+               usleep_range(500, 1000);
                if (gpio_direction_output(GPIO_MIPI_BRIDGE_RESET, 1))
                        gpio_set_value_cansleep(GPIO_MIPI_BRIDGE_RESET, 1);  /*Pull MIPI Bridge reset pin to High */
-               mdelay(1);
+               usleep_range(500, 1000);
        }
 }
 
@@ -539,7 +539,7 @@ 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);
+       usleep_range(1000, 2000);
 
        /* try to turn vadd off */
        vlcm_vadd_put();