rk3066b m701:change screen stb timing
authoryzq <yzq@rock-chips.com>
Wed, 10 Oct 2012 07:08:12 +0000 (15:08 +0800)
committeryzq <yzq@rock-chips.com>
Wed, 10 Oct 2012 07:12:00 +0000 (15:12 +0800)
arch/arm/mach-rk30/board-rk3066b-m701.c

index 1a27d78d4cdb2e3c5a4414907931289e03ca3c60..4e3aefead3aced6aae84d7812fc0aaede78734d9 100755 (executable)
@@ -604,6 +604,22 @@ static int rk_fb_io_init(struct rk29_fb_setting_info *fb_setting)
 {
        int ret = 0;
 
+       if(LCD_STB_PIN !=INVALID_GPIO)
+        {
+                ret = gpio_request(LCD_STB_PIN, NULL);
+                if (ret != 0)
+                {
+                        gpio_free(LCD_STB_PIN);
+                        printk(KERN_ERR "request lcd en pin fail!\n");
+                        return -1;
+                }
+                else
+                {
+                        gpio_direction_output(LCD_STB_PIN, LCD_STB_VALUE);
+                }
+        }
+
+       msleep(100);
        if(LCD_CS_PIN !=INVALID_GPIO)
        {
                ret = gpio_request(LCD_CS_PIN, NULL);
@@ -634,25 +650,16 @@ static int rk_fb_io_init(struct rk29_fb_setting_info *fb_setting)
                }
        }
 
-       if(LCD_STB_PIN !=INVALID_GPIO)
-        {
-                ret = gpio_request(LCD_STB_PIN, NULL);
-                if (ret != 0)
-                {
-                        gpio_free(LCD_STB_PIN);
-                        printk(KERN_ERR "request lcd en pin fail!\n");
-                        return -1;
-                }
-                else
-                {
-                        gpio_direction_output(LCD_STB_PIN, LCD_STB_VALUE);
-                }
-        }
 
        return 0;
 }
 static int rk_fb_io_disable(void)
 {
+       if(LCD_STB_PIN !=INVALID_GPIO)
+       {
+               gpio_set_value(LCD_STB_PIN, !LCD_STB_VALUE);
+       }
+       msleep(50);
        if(LCD_CS_PIN !=INVALID_GPIO)
        {
                gpio_set_value(LCD_CS_PIN, !LCD_CS_VALUE);
@@ -661,14 +668,16 @@ static int rk_fb_io_disable(void)
        {
                gpio_set_value(LCD_EN_PIN, !LCD_EN_VALUE);
        }
-       if(LCD_STB_PIN !=INVALID_GPIO)
-       {
-               gpio_set_value(LCD_STB_PIN, !LCD_STB_VALUE);
-       }
+
        return 0;
 }
 static int rk_fb_io_enable(void)
 {
+       if(LCD_STB_PIN !=INVALID_GPIO)
+       {
+               gpio_set_value(LCD_STB_PIN, LCD_STB_VALUE);
+       }
+       msleep(50);
        if(LCD_CS_PIN !=INVALID_GPIO)
        {
                gpio_set_value(LCD_CS_PIN, LCD_CS_VALUE);
@@ -677,10 +686,6 @@ static int rk_fb_io_enable(void)
        {
                gpio_set_value(LCD_EN_PIN, LCD_EN_VALUE);
        }
-       if(LCD_STB_PIN !=INVALID_GPIO)
-       {
-               gpio_set_value(LCD_STB_PIN, LCD_STB_VALUE);
-       }
        return 0;
 }