board: ge: bx50v3: Fix run-time warning
authorIan Ray <ian.ray@ge.com>
Tue, 12 Nov 2019 19:15:14 +0000 (19:15 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 7 Jan 2020 09:26:56 +0000 (10:26 +0100)
Fix GPIO reservation warning on code paths that do not need LVDS power.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
board/ge/bx50v3/bx50v3.c

index 5a5f6abb8e1eb603fae06283e06d4fcf2453e2ee..59ec9a0d240ad683a10955abed0577664c03de91 100644 (file)
@@ -714,20 +714,23 @@ int ft_board_setup(void *blob, bd_t *bd)
 static int do_backlight_enable(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 #ifdef CONFIG_VIDEO_IPUV3
-       /* We need at least 200ms between power on and backlight on
-        * as per specifications from CHI MEI */
-       mdelay(250);
+       if (!is_b850v3()) {
+               /* We need at least 200ms between power on and backlight on
+                * as per specifications from CHI MEI
+                */
+               mdelay(250);
 
-       /* enable backlight PWM 1 */
-       pwm_init(0, 0, 0);
+               /* enable backlight PWM 1 */
+               pwm_init(0, 0, 0);
 
-       /* duty cycle 5000000ns, period: 5000000ns */
-       pwm_config(0, 5000000, 5000000);
+               /* duty cycle 5000000ns, period: 5000000ns */
+               pwm_config(0, 5000000, 5000000);
 
-       /* Backlight Power */
-       gpio_direction_output(LVDS_BACKLIGHT_GP, 1);
+               /* Backlight Power */
+               gpio_direction_output(LVDS_BACKLIGHT_GP, 1);
 
-       pwm_enable(0);
+               pwm_enable(0);
+       }
 #endif
 
        return 0;