From: Robert Beckett Date: Tue, 12 Nov 2019 19:15:14 +0000 Subject: [U-Boot] [RESEND PATCH 04/10] board: ge: bx50v3: Fix run-time warning In-Reply-To: <20191112191521.11541-4-bob.beckett@collabora.com> References: <20191112191521.11541-1-bob.beckett@collabora.com> <20191112191521.11541-2-bob.beckett@collabora.com> <20191112191521.11541-3-bob.beckett@collabora.com> <20191112191521.11541-4-bob.beckett@collabora.com> Message-ID: <20191112191521.11541-5-bob.beckett@collabora.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Ian Ray Fix GPIO reservation warning on code paths that do not need LVDS power. Signed-off-by: Ian Ray Signed-off-by: Robert Beckett --- board/ge/bx50v3/bx50v3.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c index 530b106ba5..747171bf19 100644 --- a/board/ge/bx50v3/bx50v3.c +++ b/board/ge/bx50v3/bx50v3.c @@ -713,20 +713,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; -- 2.20.1