Message ID | 20240317154839.21260-1-laurent.pinchart@ideasonboard.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/panel: ilitek-ili9881c: Fix warning with GPIO controllers that sleep | expand |
Hi Laurent, On 17/03/2024 16:48, Laurent Pinchart wrote: > 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. Seems something buggy happened to the patchset, this patch doesn't appear in the cover letter and insn't numbered... > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c > index 80b386f91320..084c37fa7348 100644 > --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c > +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c > @@ -1276,10 +1276,10 @@ static int ili9881c_prepare(struct drm_panel *panel) > msleep(5); > > /* And reset it */ > - gpiod_set_value(ctx->reset, 1); > + gpiod_set_value_cansleep(ctx->reset, 1); > msleep(20); > > - gpiod_set_value(ctx->reset, 0); > + gpiod_set_value_cansleep(ctx->reset, 0); > msleep(20); > > for (i = 0; i < ctx->desc->init_length; i++) { > @@ -1334,7 +1334,7 @@ static int ili9881c_unprepare(struct drm_panel *panel) > > mipi_dsi_dcs_enter_sleep_mode(ctx->dsi); > regulator_disable(ctx->power); > - gpiod_set_value(ctx->reset, 1); > + gpiod_set_value_cansleep(ctx->reset, 1); > > return 0; > } Anyway: Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Hi Neil, On Mon, Mar 18, 2024 at 10:03:21AM +0100, Neil Armstrong wrote: > On 17/03/2024 16:48, Laurent Pinchart wrote: > > 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. > > Seems something buggy happened to the patchset, this patch doesn't appear > in the cover letter and insn't numbered... I've sent it separately, as it's functionally independent from the small series for the same driver. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > --- > > drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c > > index 80b386f91320..084c37fa7348 100644 > > --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c > > +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c > > @@ -1276,10 +1276,10 @@ static int ili9881c_prepare(struct drm_panel *panel) > > msleep(5); > > > > /* And reset it */ > > - gpiod_set_value(ctx->reset, 1); > > + gpiod_set_value_cansleep(ctx->reset, 1); > > msleep(20); > > > > - gpiod_set_value(ctx->reset, 0); > > + gpiod_set_value_cansleep(ctx->reset, 0); > > msleep(20); > > > > for (i = 0; i < ctx->desc->init_length; i++) { > > @@ -1334,7 +1334,7 @@ static int ili9881c_unprepare(struct drm_panel *panel) > > > > mipi_dsi_dcs_enter_sleep_mode(ctx->dsi); > > regulator_disable(ctx->power); > > - gpiod_set_value(ctx->reset, 1); > > + gpiod_set_value_cansleep(ctx->reset, 1); > > > > return 0; > > } > > Anyway: > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Hi, On Sun, 17 Mar 2024 17:48:39 +0200, Laurent Pinchart wrote: > 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. > > Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next) [1/1] drm/panel: ilitek-ili9881c: Fix warning with GPIO controllers that sleep https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/ee7860cd8b5763017f8dc785c2851fecb7a0c565
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c index 80b386f91320..084c37fa7348 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c @@ -1276,10 +1276,10 @@ static int ili9881c_prepare(struct drm_panel *panel) msleep(5); /* And reset it */ - gpiod_set_value(ctx->reset, 1); + gpiod_set_value_cansleep(ctx->reset, 1); msleep(20); - gpiod_set_value(ctx->reset, 0); + gpiod_set_value_cansleep(ctx->reset, 0); msleep(20); for (i = 0; i < ctx->desc->init_length; i++) { @@ -1334,7 +1334,7 @@ static int ili9881c_unprepare(struct drm_panel *panel) mipi_dsi_dcs_enter_sleep_mode(ctx->dsi); regulator_disable(ctx->power); - gpiod_set_value(ctx->reset, 1); + gpiod_set_value_cansleep(ctx->reset, 1); return 0; }
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> --- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)