From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Re: [PATCH 2/2] drm/bridge: lt9211: Add drive-strength-microamp DT property
Date: Sat, 16 May 2026 13:11:28 +1000 [thread overview]
Message-ID: <review-patch2-dff39a7a-a25c-4565-ad20-48026995af11@nabladev.com> (raw)
In-Reply-To: <dff39a7a-a25c-4565-ad20-48026995af11@nabladev.com>
Patch Review
**Looks good.** The implementation is correct and backward compatible.
**Register value correctness**: The original hardcoded value was `0x48`:
```c
{ 0x823f, 0x48 },
```
The patch changes this to:
```c
{ 0x823f, 0x40 | ctx->lvds_hsdrv_isel },
```
Since `0x48 = 0x40 | 0x08` and the default `lvds_hsdrv_isel = 8`, this correctly preserves the original value when the DT property is absent. The upper nibble (`0x40`) is preserved while bits `[3:0]` carry the drive-strength select. This is correct.
**DT parsing**: The linear search through `lt9211_hsdrv_microamp[]` (16 entries) is fine, and the error path for invalid values is handled correctly with `dev_err` + `-EINVAL`.
Minor points:
1. **`of_property_read_u32` vs `device_property_read_u32`**: The patch uses `of_property_read_u32()`, which is consistent with the rest of this driver (it's heavily OF-dependent with `of_graph_*` calls). Modern kernel convention prefers the firmware-agnostic `device_property_read_u32(dev, ...)`, but consistency with the existing driver is a reasonable choice here.
2. **Lookup table could use `match_string`-style helper**: The kernel has `match_u32_property_value()` or similar patterns, but the explicit loop is perfectly clear for 16 elements. No change needed.
3. **The `const` array becomes runtime-initialized**: `system_lt9211_tx_phy_seq[]` was previously fully compile-time constant (eligible for `.rodata`). With `ctx->lvds_hsdrv_isel`, it's now stack-initialized at each call. This is fine — the same pattern already exists in the array with `ctx->lvds_dual_link` on the line just above:
```c
{ 0x823b, 0x38 | (ctx->lvds_dual_link ? BIT(7) : 0) },
```
So this is consistent with the existing code.
4. **Validation redundancy**: The DT schema enum already constrains values, but the driver validates too. This is good practice since not all DTs are schema-validated at runtime.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-16 3:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 16:46 [PATCH 0/2] drm/bridge: lt9211: Add drive-strength-microamp DT property Boerge Struempfel
2026-05-12 16:46 ` [PATCH 1/2] dt-bindings: display/bridge: lt9211: Add drive-strength-microamp property Boerge Struempfel
2026-05-12 17:05 ` Conor Dooley
2026-05-16 3:11 ` Claude review: " Claude Code Review Bot
2026-05-12 16:46 ` [PATCH 2/2] drm/bridge: lt9211: Add drive-strength-microamp DT property Boerge Struempfel
2026-05-12 18:29 ` Marek Vasut
2026-05-13 9:02 ` Börge Strümpfel
2026-05-13 11:33 ` Marek Vasut
2026-05-16 3:11 ` Claude Code Review Bot [this message]
2026-05-16 3:11 ` Claude review: " Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-patch2-dff39a7a-a25c-4565-ad20-48026995af11@nabladev.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox