From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: phy: move provider API out of public Date: Tue, 10 Mar 2026 11:57:17 +1000 Message-ID: In-Reply-To: <20260309190842.927634-13-vladimir.oltean@nxp.com> References: <20260309190842.927634-1-vladimir.oltean@nxp.com> <20260309190842.927634-13-vladimir.oltean@nxp.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review This is the core patch. Key decisions: 1. **`drivers/phy/phy-provider.h`** =E2=80=94 contains `struct phy`, `struc= t phy_ops`, `struct phy_attrs`, `struct phy_provider`, `phy_set_drvdata()`/= `phy_get_drvdata()`, all provider registration/creation APIs. Placed in `dr= ivers/phy/` rather than `include/linux/phy/` to discourage out-of-tree prov= iders. 2. **`include/linux/phy/phy-props.h`** =E2=80=94 shared types: `enum phy_mo= de`, `enum phy_media`, `union phy_configure_opts`, etc. Included by both co= nsumer and provider headers. 3. **`include/linux/phy/phy.h`** =E2=80=94 now the consumer header. Forward= -declares `struct phy` as opaque. Exports only consumer functions. 4. **Temporary compatibility**: `#include "../../../drivers/phy/phy-provide= r.h"` is added to `phy.h` so consumers that haven't been updated yet still = compile. Removed in patch 23. 5. `phy_get_mode()`, `phy_get_bus_width()`, `phy_set_bus_width()` are moved= from static inlines to exported symbols in `phy-core.c`, since they need s= truct phy access. 6. `struct phy_lookup` and `to_phy()` macro are moved into `phy-core.c` as = they're implementation details. The relative include path `#include "../../../drivers/phy/phy-provider.h"` = is ugly but intentionally temporary. The comment in phy-props.h says `phy-p= rovider.h -- Generic PHY properties` which is a copy-paste error from the o= riginal header name =E2=80=94 should say `phy-props.h -- Generic PHY proper= ties`. Minor nit. Already `Reviewed-by: Dmitry Baryshkov`. Solid implementation. --- Generated by Claude Code Patch Reviewer