]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
arch: arm: mach-tegra: 4k eDP regulator
authorShu Zhong <shuz@nvidia.com>
Mon, 17 Aug 2015 18:35:13 +0000 (11:35 -0700)
committermobile promotions <svcmobile_promotions@nvidia.com>
Wed, 2 Sep 2015 08:15:46 +0000 (01:15 -0700)
avdd_io_edp supply needs to be enabled on T210 for eDP.
Updated eDP panel driver to correctly handle this regulator.

Bug 200119185

Change-Id: I3e5bd7a2d07c75054f096849a093447e588c4393
Signed-off-by: Shu Zhong <shuz@nvidia.com>
Reviewed-on: http://git-master/r/784930
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
arch/arm/mach-tegra/panel-s-edp-uhdtv-15-6.c

index d26fc6b4c69392cf9eb06061f1f0756870d82ebd..e0fe6fd6efbd1eae92cc077e103ce3a2084b2e76 100644 (file)
@@ -29,6 +29,8 @@ static bool reg_requested;
 
 static struct regulator *vdd_lcd_bl_en; /* VDD_LCD_BL_EN */
 
+static struct regulator *avdd_io_edp; /* AVDD_IO_EDP */
+
 static struct regulator *vdd_ds_1v8; /* VDD_1V8_AON */
 static struct regulator *avdd_3v3_dp; /* EDP_3V3_IN: LCD_RST_GPIO */
 static struct regulator *avdd_lcd; /* VDD_LCD_HV */
@@ -92,6 +94,14 @@ static int shield_edp_regulator_get(struct device *dev)
                en_panel_rst = panel_of.panel_gpio[TEGRA_GPIO_RESET];
        }
 
+       avdd_io_edp = regulator_get(dev, "avdd_io_edp");
+       if (IS_ERR(avdd_io_edp)) {
+               pr_err("avdd_io_edp regulator get failed\n");
+               err = PTR_ERR(avdd_io_edp);
+               avdd_io_edp = NULL;
+               goto fail;
+       }
+
        reg_requested = true;
        return 0;
 fail:
@@ -152,6 +162,14 @@ static int edp_s_uhdtv_15_6_enable(struct device *dev)
        }
        msleep(180);
 
+       if (avdd_io_edp) {
+               err = regulator_enable(avdd_io_edp);
+               if (err < 0) {
+                       pr_err("avdd_io_edp regulator enable failed\n");
+                       goto fail;
+               }
+       }
+
        return 0;
 fail:
        return err;
@@ -176,6 +194,9 @@ static int edp_s_uhdtv_15_6_disable(struct device *dev)
        if (vdd_ds_1v8)
                regulator_disable(vdd_ds_1v8);
 
+       if (avdd_io_edp)
+               regulator_disable(avdd_io_edp);
+
        msleep(500);
 
        return 0;