video: tegra: Remove delay if power is enabled
Hyongbin Kim [Thu, 12 Sep 2013 08:42:55 +0000 (17:42 +0900)]
When first boot, vdd_lcd_bl_en is already enabled.
vdd_lcd_bl_en doesn't share power rail, we can remove 200ms delay.

Bug 1367030

Change-Id: I4f9d4900c59a858ae34224cba42791f36363851c
Signed-off-by: Hyongbin Kim <hyongbink@nvidia.com>
Reviewed-on: http://git-master/r/273602
(cherry picked from commit 4fb2530fb5817ec9a752af5490eb01ba378e1a2a)
Reviewed-on: http://git-master/r/304689
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Harry Hong <hhong@nvidia.com>

drivers/video/tegra/of_lcd_device_data/tegratab_lcd_dev_data.c

index 4d01678..589253b 100644 (file)
@@ -176,12 +176,15 @@ static int lgd_wxga_7_0_postpoweron(struct device *dev)
 {
        int err = 0;
 
-       /*
-        * MIPI to VLED > 200ms, based on the spec
-        * init_cmd cares 20ms delay already.
-        */
-       msleep(180);
        if (vdd_lcd_bl_en) {
+               /*If rail is already enabled, we don't need delay*/
+               /*
+                * MIPI to VLED > 200ms, based on the spec
+                * init_cmd cares 20ms delay already.
+               */
+               if (!regulator_is_enabled(vdd_lcd_bl_en))
+                       msleep(180);
+
                err = regulator_enable(vdd_lcd_bl_en);
                if (err < 0) {
                        pr_err("%s: vdd_lcd_bl_en en failed\n", __func__);