public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/panel: ilitek-ili9882t: use gpiod_set_value_cansleep()
@ 2026-03-03 15:21 John Keeping
  2026-03-03 21:04 ` Claude review: " Claude Code Review Bot
  2026-03-03 21:04 ` Claude Code Review Bot
  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 related	[flat|nested] 3+ messages in thread

* Claude review: 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-03 21:04 ` Claude review: " Claude Code Review Bot
@ 2026-03-03 21:04 ` Claude Code Review Bot
  1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-03 21:04 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: drm/panel: ilitek-ili9882t: use gpiod_set_value_cansleep()
Author: John Keeping <jkeeping@inmusicbrands.com>
Patches: 1
Reviewed: 2026-03-04T07:04:08.499180

---

This is a single, straightforward patch that mechanically replaces all `gpiod_set_value()` calls with `gpiod_set_value_cansleep()` in the ilitek-ili9882t panel driver. The change is correct and well-motivated. All call sites are in process context (`probe`, `prepare`, `unprepare`) where sleeping is permitted, as evidenced by the surrounding `usleep_range()`, `msleep()`, `regulator_enable/disable()`, and `mipi_dsi_dcs_nop()` calls — all of which can sleep themselves. Using `gpiod_set_value_cansleep()` allows the driver to work with I2C- or SPI-based GPIO expanders that require sleeping for bus transactions.

No issues found. This is a clean, correct fix.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Claude review: 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-03 21:04 ` Claude Code Review Bot
  2026-03-03 21:04 ` Claude Code Review Bot
  1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-03 21:04 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Correctness: Good.** All 7 replacements are in functions that are clearly in process/sleepable context:

- `ili9882t_unprepare()` — called from DRM panel unblanking path in process context; surrounding code calls `usleep_range()` and `regulator_disable()`.
- `ili9882t_prepare()` — same; surrounding code calls `usleep_range()`, `msleep()`, `regulator_enable()`, and `mipi_dsi_dcs_nop()`.
- `ili9882t_add()` — called from `probe` path, which is always process context.

**Commit message:** Clear and accurate. The rationale ("to allow use of this driver with GPIO controllers that might sleep") is the standard justification for this class of change.

**Completeness:** The patch covers every `gpiod_set_value()` call in the file — no instances are missed.

**Reviewed-by worthy:** Yes. This is a routine, low-risk correctness improvement with no functional change for GPIO controllers that don't sleep, and enables the driver to work correctly with those that do.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-03 21:04 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-03 21:04 ` Claude review: " Claude Code Review Bot
2026-03-03 21:04 ` Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox