From b6feb567d14bc77f3beb780463c739d1b0bf1040 Mon Sep 17 00:00:00 2001 From: Daniel DeGrasse Date: Wed, 31 Jan 2024 10:57:08 -0600 Subject: [PATCH] drivers: display: ili9xxx: do not delay for reset unless supported Check the return code of mipi_dbi_reset, and do not delay for the reset wait time unless the mipi controller has issued a hardware reset to the display. Signed-off-by: Daniel DeGrasse --- drivers/display/display_ili9xxx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/display/display_ili9xxx.c b/drivers/display/display_ili9xxx.c index dc53daa3c862..e07e26c274b8 100644 --- a/drivers/display/display_ili9xxx.c +++ b/drivers/display/display_ili9xxx.c @@ -48,7 +48,9 @@ static void ili9xxx_hw_reset(const struct device *dev) { const struct ili9xxx_config *config = dev->config; - mipi_dbi_reset(config->mipi_dev, ILI9XXX_RESET_PULSE_TIME); + if (mipi_dbi_reset(config->mipi_dev, ILI9XXX_RESET_PULSE_TIME) < 0) { + return; + }; k_sleep(K_MSEC(ILI9XXX_RESET_WAIT_TIME)); }