From: Vincent Palatin Date: Thu, 14 Feb 2013 20:29:57 +0000 (-0800) Subject: CHROMIUM: exynos: de-activate internal backlight on Spring X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=9087e279c6c583c960139c69ee0444a537b2f37b;p=cascardo%2Flinux.git CHROMIUM: exynos: de-activate internal backlight on Spring 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 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 Reviewed-by: Vincent Palatin Tested-by: Vincent Palatin --- diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index eab7d4156463..9ab8fd36fb02 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -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!