summaryrefslogtreecommitdiff
path: root/drivers/video/imx/mxc_ipuv3_fb.c
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2019-07-22 06:49:08 +0200
committerAnatolij Gustschin <agust@denx.de>2019-07-30 12:58:33 +0200
commit42a7ce27d97022f4abbba142dfa00d1450512f0a (patch)
tree47a869d544907ea73a6327e7d8b439bfc3a83ba9 /drivers/video/imx/mxc_ipuv3_fb.c
parentf4ec1ae08ea9a4ed51ea0bf0583c416be7ec7eb8 (diff)
downloadu-boot-42a7ce27d97022f4abbba142dfa00d1450512f0a.tar.gz
mxc_ipuv3_fb.c: enable a backlight on a panel
check if we get a panel device, if so, enable the backlight on it. Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/video/imx/mxc_ipuv3_fb.c')
-rw-r--r--drivers/video/imx/mxc_ipuv3_fb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c
index aca76bd9cc..c64be38e49 100644
--- a/drivers/video/imx/mxc_ipuv3_fb.c
+++ b/drivers/video/imx/mxc_ipuv3_fb.c
@@ -25,6 +25,7 @@
#include "mxcfb.h"
#include "ipu_regs.h"
#include "display.h"
+#include <panel.h>
#include <dm.h>
#include <video.h>
@@ -641,6 +642,7 @@ static int ipuv3_video_probe(struct udevice *dev)
#if defined(CONFIG_DISPLAY)
struct udevice *disp_dev;
#endif
+ struct udevice *panel_dev;
u32 fb_start, fb_end;
int ret;
@@ -667,6 +669,9 @@ static int ipuv3_video_probe(struct udevice *dev)
return ret;
}
#endif
+ ret = uclass_get_device(UCLASS_PANEL, 0, &panel_dev);
+ if (panel_dev)
+ panel_enable_backlight(panel_dev);
uc_priv->xsize = gmode->xres;
uc_priv->ysize = gmode->yres;