Gfx-display: correct sleep time for pr2 panel reset
authorGeng Xiujun <xiujun.geng@intel.com>
Wed, 23 May 2012 03:12:13 +0000 (11:12 +0800)
committerbuildbot <buildbot@intel.com>
Mon, 28 May 2012 15:48:39 +0000 (08:48 -0700)
BZ: 37475

This patch has following changes:
(1). change sleep time to 3ms between pulling panel reset pin low and high.
(2). change sleep time to 10ms after reset panel.
(3). using usleep_range rather than mdelay.

Change-Id: I2bd8960c10333d2e4e9b8fbcd46bc69d27587b4c
Signed-off-by: Geng Xiujun <xiujun.geng@intel.com>
Reviewed-on: http://android.intel.com:8080/49803
Reviewed-by: Xu, Randy <randy.xu@intel.com>
Reviewed-by: Hu, Austin <austin.hu@intel.com>
Reviewed-by: Zhang, Lei <lei.zhang@intel.com>
Reviewed-by: Ai, Ke <ke.ai@intel.com>
Tested-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/mrst/drv/tmd_6x10_vid.c

index 7abab5c..0fb5cba 100755 (executable)
@@ -590,14 +590,15 @@ static int mdfld_dsi_pr2_panel_reset(struct mdfld_dsi_config *dsi_config,
                gpio_direction_output(gpio_mipi_panel_reset, 0);
                gpio_set_value_cansleep(gpio_mipi_panel_reset, 0);
 
-               /*reset low level width 11ms*/
-               mdelay(10);
+               /* HW reset need minmum 3ms */
+               usleep_range(3000, 4000);
 
                gpio_direction_output(gpio_mipi_panel_reset, 1);
                gpio_set_value_cansleep(gpio_mipi_panel_reset, 1);
 
-               /*reset time 5ms*/
-               mdelay(5);
+               /* HW reset need min. 3ms, and before sending IC init sequence,
+                * need wait 7ms, so here total wait time is 10ms */
+               usleep_range(10000, 11000);
        } else {
                PSB_DEBUG_ENTRY("pr2 panel reset fail.!");
        }