* [PATCH] drm/panel: ilitek-ili9882t: use gpiod_set_value_cansleep()
@ 2026-03-03 15:21 John Keeping
2026-03-04 16:38 ` Neil Armstrong
2026-03-10 13:28 ` Neil Armstrong
0 siblings, 2 replies; 3+ messages in thread
From: John Keeping @ 2026-03-03 15:21 UTC (permalink / raw)
To: dri-devel
Cc: John Keeping, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
linux-kernel
All of these GPIO calls are in process context where they can sleep.
Use the appropriate function call to allow use of this driver with GPIO
controllers that might sleep.
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
---
drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
index 8b2bfb7d36385..5f4e0d82ee673 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
@@ -592,7 +592,7 @@ static int ili9882t_unprepare(struct drm_panel *panel)
{
struct ili9882t *ili = to_ili9882t(panel);
- gpiod_set_value(ili->enable_gpio, 0);
+ gpiod_set_value_cansleep(ili->enable_gpio, 0);
usleep_range(1000, 2000);
regulator_disable(ili->avee);
regulator_disable(ili->avdd);
@@ -608,7 +608,7 @@ static int ili9882t_prepare(struct drm_panel *panel)
struct ili9882t *ili = to_ili9882t(panel);
int ret;
- gpiod_set_value(ili->enable_gpio, 0);
+ gpiod_set_value_cansleep(ili->enable_gpio, 0);
usleep_range(1000, 1500);
ret = regulator_enable(ili->pp3300);
@@ -638,11 +638,11 @@ static int ili9882t_prepare(struct drm_panel *panel)
}
usleep_range(1000, 2000);
- gpiod_set_value(ili->enable_gpio, 1);
+ gpiod_set_value_cansleep(ili->enable_gpio, 1);
usleep_range(1000, 2000);
- gpiod_set_value(ili->enable_gpio, 0);
+ gpiod_set_value_cansleep(ili->enable_gpio, 0);
msleep(50);
- gpiod_set_value(ili->enable_gpio, 1);
+ gpiod_set_value_cansleep(ili->enable_gpio, 1);
usleep_range(6000, 10000);
ret = ili->desc->init(ili);
@@ -652,7 +652,7 @@ static int ili9882t_prepare(struct drm_panel *panel)
return 0;
poweroff:
- gpiod_set_value(ili->enable_gpio, 0);
+ gpiod_set_value_cansleep(ili->enable_gpio, 0);
regulator_disable(ili->avee);
poweroffavdd:
regulator_disable(ili->avdd);
@@ -793,7 +793,7 @@ static int ili9882t_add(struct ili9882t *ili)
return PTR_ERR(ili->enable_gpio);
}
- gpiod_set_value(ili->enable_gpio, 0);
+ gpiod_set_value_cansleep(ili->enable_gpio, 0);
err = of_drm_get_panel_orientation(dev->of_node, &ili->orientation);
if (err < 0) {
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drm/panel: ilitek-ili9882t: use gpiod_set_value_cansleep()
2026-03-03 15:21 [PATCH] drm/panel: ilitek-ili9882t: use gpiod_set_value_cansleep() John Keeping
@ 2026-03-04 16:38 ` Neil Armstrong
2026-03-10 13:28 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2026-03-04 16:38 UTC (permalink / raw)
To: John Keeping, dri-devel
Cc: Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, linux-kernel
On 3/3/26 16:21, John Keeping wrote:
> All of these GPIO calls are in process context where they can sleep.
> Use the appropriate function call to allow use of this driver with GPIO
> controllers that might sleep.
>
> Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
> ---
> drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
> index 8b2bfb7d36385..5f4e0d82ee673 100644
> --- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
> +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
> @@ -592,7 +592,7 @@ static int ili9882t_unprepare(struct drm_panel *panel)
> {
> struct ili9882t *ili = to_ili9882t(panel);
>
> - gpiod_set_value(ili->enable_gpio, 0);
> + gpiod_set_value_cansleep(ili->enable_gpio, 0);
> usleep_range(1000, 2000);
> regulator_disable(ili->avee);
> regulator_disable(ili->avdd);
> @@ -608,7 +608,7 @@ static int ili9882t_prepare(struct drm_panel *panel)
> struct ili9882t *ili = to_ili9882t(panel);
> int ret;
>
> - gpiod_set_value(ili->enable_gpio, 0);
> + gpiod_set_value_cansleep(ili->enable_gpio, 0);
> usleep_range(1000, 1500);
>
> ret = regulator_enable(ili->pp3300);
> @@ -638,11 +638,11 @@ static int ili9882t_prepare(struct drm_panel *panel)
> }
> usleep_range(1000, 2000);
>
> - gpiod_set_value(ili->enable_gpio, 1);
> + gpiod_set_value_cansleep(ili->enable_gpio, 1);
> usleep_range(1000, 2000);
> - gpiod_set_value(ili->enable_gpio, 0);
> + gpiod_set_value_cansleep(ili->enable_gpio, 0);
> msleep(50);
> - gpiod_set_value(ili->enable_gpio, 1);
> + gpiod_set_value_cansleep(ili->enable_gpio, 1);
> usleep_range(6000, 10000);
>
> ret = ili->desc->init(ili);
> @@ -652,7 +652,7 @@ static int ili9882t_prepare(struct drm_panel *panel)
> return 0;
>
> poweroff:
> - gpiod_set_value(ili->enable_gpio, 0);
> + gpiod_set_value_cansleep(ili->enable_gpio, 0);
> regulator_disable(ili->avee);
> poweroffavdd:
> regulator_disable(ili->avdd);
> @@ -793,7 +793,7 @@ static int ili9882t_add(struct ili9882t *ili)
> return PTR_ERR(ili->enable_gpio);
> }
>
> - gpiod_set_value(ili->enable_gpio, 0);
> + gpiod_set_value_cansleep(ili->enable_gpio, 0);
>
> err = of_drm_get_panel_orientation(dev->of_node, &ili->orientation);
> if (err < 0) {
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drm/panel: ilitek-ili9882t: use gpiod_set_value_cansleep()
2026-03-03 15:21 [PATCH] drm/panel: ilitek-ili9882t: use gpiod_set_value_cansleep() John Keeping
2026-03-04 16:38 ` Neil Armstrong
@ 2026-03-10 13:28 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2026-03-10 13:28 UTC (permalink / raw)
To: dri-devel, John Keeping
Cc: Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, linux-kernel
Hi,
On Tue, 03 Mar 2026 15:21:24 +0000, John Keeping wrote:
> All of these GPIO calls are in process context where they can sleep.
> Use the appropriate function call to allow use of this driver with GPIO
> controllers that might sleep.
>
>
Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)
[1/1] drm/panel: ilitek-ili9882t: use gpiod_set_value_cansleep()
https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/b26c17c924ff9ecae6312e1947cc6c1b561b40a7
--
Neil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-10 13:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-03 15:21 [PATCH] drm/panel: ilitek-ili9882t: use gpiod_set_value_cansleep() John Keeping
2026-03-04 16:38 ` Neil Armstrong
2026-03-10 13:28 ` Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®