From a8f8c1c1854816f1cb1975a06168acaf7e88f89d Mon Sep 17 00:00:00 2001 From: Mahesh Mahadevan Date: Tue, 5 Apr 2022 17:07:35 -0500 Subject: [PATCH] drivers: display: Add blanking support for NXP ELCDIF driver Implement the blanking_on and blanking_off API functions for NXP's MCUX ELCDIF display driver Signed-off-by: Mahesh Mahadevan --- drivers/display/display_mcux_elcdif.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/display/display_mcux_elcdif.c b/drivers/display/display_mcux_elcdif.c index ee98177ffb6..603acc3d54c 100644 --- a/drivers/display/display_mcux_elcdif.c +++ b/drivers/display/display_mcux_elcdif.c @@ -114,14 +114,16 @@ static void *mcux_elcdif_get_framebuffer(const struct device *dev) static int mcux_elcdif_display_blanking_off(const struct device *dev) { - LOG_ERR("Display blanking control not implemented"); - return -ENOTSUP; + const struct mcux_elcdif_config *config = dev->config; + + return gpio_pin_set_dt(&config->backlight_gpio, 1); } static int mcux_elcdif_display_blanking_on(const struct device *dev) { - LOG_ERR("Display blanking control not implemented"); - return -ENOTSUP; + const struct mcux_elcdif_config *config = dev->config; + + return gpio_pin_set_dt(&config->backlight_gpio, 0); } static int mcux_elcdif_set_brightness(const struct device *dev,