From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: Re: [PATCH] staging: fbtft: fb_tinylcd: replace udelay() with usleep_range() Date: Fri, 13 Mar 2026 14:44:57 +1000 Message-ID: In-Reply-To: References: X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Unrelated whitespace change included:** The patch changes the continuation-line alignment of the `write_reg` call a= t line 40-41, which is unrelated to the `udelay` =E2=86=92 `usleep_range` c= onversion: ```diff write_reg(par, 0xE0, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00, - 0x00, 0x35, 0x33, 0x00, 0x00, 0x00); + 0x00, 0x35, 0x33, 0x00, 0x00, 0x00); ``` This should either be dropped from this patch or submitted as a separate cl= eanup. Mixing unrelated changes makes review and bisection harder. **Sleeping context concern:** `usleep_range()` can only be called from process/sleepable context =E2=80= =94 it cannot be used in atomic context (interrupts, spinlock-held sections= , etc.). The `init_display` function is called via `fbtft_ops.init_display`= , which is typically invoked during probe or from sysfs, so it should be in= sleepable context. However, the commit message should mention that this wa= s verified, or the author should confirm that `init_display` is never calle= d from atomic context. Looking at the fbtft framework, this appears safe, b= ut it's worth calling out. **Upper bound of the range:** The chosen range `usleep_range(250, 500)` doubles the maximum delay compare= d to the original. For a post-sleep-exit delay on a display controller, thi= s is likely fine =E2=80=94 MIPI DCS `EXIT_SLEEP_MODE` typically requires at= least 120ms per spec (this 250=C2=B5s delay seems like it may already be t= oo short, but that's a pre-existing issue). The 250=E2=80=93500=C2=B5s rang= e is acceptable. **Verdict:** The core change is fine but the patch should drop the unrelate= d whitespace change. A v2 with only the `udelay` =E2=86=92 `usleep_range` h= unk would be clean and acceptable. --- Generated by Claude Code Patch Reviewer