Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/panel: ronbo-rb070d30: fix warning with gpio controllers that sleep

The ronbo-rb070d30 controles the various gpios for reset, standby,
vertical and horizontal flip using the non-sleeping gpiod_set_value()
function.

Switch to using gpiod_set_value_cansleep() when controlling reset_gpio to
support GPIO providers that may sleep, such as I2C GPIO expanders.

This fixes noisy complaints in kernel log for gpio providers that do
sleep.

Signed-off-by: Josua Mayer <josua@solid-run.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20251117-imx8mp-hb-iiot-v3-5-bf1a4cf5fa8e@solid-run.com

authored by

Josua Mayer and committed by
Neil Armstrong
93f5a0dc 72539c4b

+4 -4
+4 -4
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
··· 54 54 } 55 55 56 56 msleep(20); 57 - gpiod_set_value(ctx->gpios.power, 1); 57 + gpiod_set_value_cansleep(ctx->gpios.power, 1); 58 58 msleep(20); 59 - gpiod_set_value(ctx->gpios.reset, 1); 59 + gpiod_set_value_cansleep(ctx->gpios.reset, 1); 60 60 msleep(20); 61 61 return 0; 62 62 } ··· 65 65 { 66 66 struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel); 67 67 68 - gpiod_set_value(ctx->gpios.reset, 0); 69 - gpiod_set_value(ctx->gpios.power, 0); 68 + gpiod_set_value_cansleep(ctx->gpios.reset, 0); 69 + gpiod_set_value_cansleep(ctx->gpios.power, 0); 70 70 regulator_disable(ctx->supply); 71 71 72 72 return 0;