diff options
author | Ajay Kumar <ajaykumar.rs@samsung.com> | 2015-03-04 19:05:26 +0530 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2015-04-06 14:34:40 +0900 |
commit | 9018efa7e227bc7041a98f5c5efebaa7ecfcfd0d (patch) | |
tree | 4a2ccc46c2557fb83f9d19d44ba2b10f10f8542d /drivers | |
parent | 6102560891d09db79196654aa414afc5acfa7911 (diff) | |
download | u-boot-imx-9018efa7e227bc7041a98f5c5efebaa7ecfcfd0d.zip u-boot-imx-9018efa7e227bc7041a98f5c5efebaa7ecfcfd0d.tar.gz u-boot-imx-9018efa7e227bc7041a98f5c5efebaa7ecfcfd0d.tar.bz2 |
video: exynos_fb: configure backlight GPIOs if specified in DT
Add support to configure PWM_OUT(PWM output) GPIO and
BL_EN(backlight enable) GPIO, if provided in FIMD DT node.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/exynos_fb.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index c5d7330..8f3b826 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -19,6 +19,7 @@ #include <asm/arch/mipi_dsim.h> #include <asm/arch/dp_info.h> #include <asm/arch/system.h> +#include <asm/gpio.h> #include <asm-generic/errno.h> #include "exynos_fb.h" @@ -102,6 +103,10 @@ __weak int exynos_lcd_misc_init(vidinfo_t *vid) static void lcd_panel_on(vidinfo_t *vid) { + struct gpio_desc pwm_out_gpio; + struct gpio_desc bl_en_gpio; + unsigned int node; + udelay(vid->init_delay); exynos_backlight_reset(); @@ -121,6 +126,22 @@ static void lcd_panel_on(vidinfo_t *vid) exynos_backlight_on(1); +#ifdef CONFIG_OF_CONTROL + node = fdtdec_next_compatible(gd->fdt_blob, 0, + COMPAT_SAMSUNG_EXYNOS_FIMD); + if (node <= 0) { + debug("FIMD: Can't get device node for FIMD\n"); + return; + } + gpio_request_by_name_nodev(gd->fdt_blob, node, "samsung,pwm-out-gpio", + 0, &pwm_out_gpio, + GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); + + gpio_request_by_name_nodev(gd->fdt_blob, node, "samsung,bl-en-gpio", 0, + &bl_en_gpio, + GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); + +#endif exynos_cfg_ldo(); exynos_enable_ldo(1); |