CHROMIUM: exynos: de-activate internal backlight on Spring
authorVincent Palatin <vpalatin@chromium.org>
Thu, 14 Feb 2013 20:29:57 +0000 (12:29 -0800)
committerChromeBot <chrome-bot@google.com>
Fri, 15 Feb 2013 18:11:35 +0000 (10:11 -0800)
On Spring, the Parade eDP bridge generates internally the PWM for the
LCD backlight.
When it is present, we can avoid configuring the
internal Exynos PWM in order to save power and to have only one
backlight device.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:17227
TEST=boot on Spring and Snow, see backlight coming up in both cases

Change-Id: Id4d9db185b5e928f0b81d7fb358575cf07a20e36
Reviewed-on: https://gerrit.chromium.org/gerrit/43308
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
arch/arm/mach-exynos/mach-exynos5-dt.c

index eab7d41..9ab8fd3 100644 (file)
@@ -1050,18 +1050,26 @@ static void __init exynos5250_dt_machine_init(void)
        }
 
        /*
-        * Request lcd_bl_en GPIO for smdk5250_bl_notify().
-        * TODO: Fix this so we are not at risk of requesting the GPIO
-        * multiple times, this should be done with device tree, and
-        * likely integrated into the plat-samsung/dev-backlight.c init.
+        * Set the backlight on LCD_PWM pin only for boards not using the
+        * Parade eDP bridge which has an internal PWN for the backlight.
         */
-       gpio_request_one(EXYNOS5_GPX3(0), GPIOF_OUT_INIT_HIGH, "lcd_bl_en");
+       if (!of_find_compatible_node(NULL, NULL, "parade,ps8622")) {
+               if (of_machine_is_compatible("google,snow")) {
+                       smdk5250_bl_data.max_brightness = 2800;
+                       smdk5250_bl_data.dft_brightness = 2800;
+               }
+
+               /*
+                * Request lcd_bl_en GPIO for smdk5250_bl_notify().
+                * TODO: Fix this so we are not at risk of requesting the GPIO
+                * multiple times, this should be done with device tree, and
+                * likely integrated into the plat-samsung/dev-backlight.c init.
+                */
+               gpio_request_one(EXYNOS5_GPX3(0), GPIOF_OUT_INIT_HIGH,
+                                "lcd_bl_en");
 
-       if (of_machine_is_compatible("google,snow")) {
-               smdk5250_bl_data.max_brightness = 2800;
-               smdk5250_bl_data.dft_brightness = 2800;
+               samsung_bl_set(&smdk5250_bl_gpio_info, &smdk5250_bl_data);
        }
-       samsung_bl_set(&smdk5250_bl_gpio_info, &smdk5250_bl_data);
 
        /*
         * HACK ALERT! TODO: FIXME!