mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-13 04:39:36 +02:00
drm/panel: ilitek-ili9881c: Fix warning with GPIO controllers that sleep
[ Upstream commit ee7860cd8b
]
The ilitek-ili9881c controls the reset GPIO using the non-sleeping
gpiod_set_value() function. This complains loudly when the GPIO
controller needs to sleep. As the caller can sleep, use
gpiod_set_value_cansleep() to fix the issue.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240317154839.21260-1-laurent.pinchart@ideasonboard.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240317154839.21260-1-laurent.pinchart@ideasonboard.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
08f6c05feb
commit
1618f7a875
|
@ -883,10 +883,10 @@ static int ili9881c_prepare(struct drm_panel *panel)
|
||||||
msleep(5);
|
msleep(5);
|
||||||
|
|
||||||
/* And reset it */
|
/* And reset it */
|
||||||
gpiod_set_value(ctx->reset, 1);
|
gpiod_set_value_cansleep(ctx->reset, 1);
|
||||||
msleep(20);
|
msleep(20);
|
||||||
|
|
||||||
gpiod_set_value(ctx->reset, 0);
|
gpiod_set_value_cansleep(ctx->reset, 0);
|
||||||
msleep(20);
|
msleep(20);
|
||||||
|
|
||||||
for (i = 0; i < ctx->desc->init_length; i++) {
|
for (i = 0; i < ctx->desc->init_length; i++) {
|
||||||
|
@ -941,7 +941,7 @@ static int ili9881c_unprepare(struct drm_panel *panel)
|
||||||
|
|
||||||
mipi_dsi_dcs_enter_sleep_mode(ctx->dsi);
|
mipi_dsi_dcs_enter_sleep_mode(ctx->dsi);
|
||||||
regulator_disable(ctx->power);
|
regulator_disable(ctx->power);
|
||||||
gpiod_set_value(ctx->reset, 1);
|
gpiod_set_value_cansleep(ctx->reset, 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user