]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mxc_ipuv3_fb.c: enable a backlight on a panel
authorHeiko Schocher <hs@denx.de>
Mon, 22 Jul 2019 04:49:08 +0000 (06:49 +0200)
committerAnatolij Gustschin <agust@denx.de>
Tue, 30 Jul 2019 10:58:33 +0000 (12:58 +0200)
check if we get a panel device, if so, enable
the backlight on it.

Signed-off-by: Heiko Schocher <hs@denx.de>
drivers/video/imx/mxc_ipuv3_fb.c

index aca76bd9ccf2cc11ca9020a73882db72c3993eb2..c64be38e49267720e146cb4343be696b326d7496 100644 (file)
@@ -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;