From: sashiko-bot@kernel.org
To: "Ronald Claveau" <linux-kernel-dev@aliel.fr>
Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org,
robh@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org,
vkoul@kernel.org, olteanv@gmail.com
Subject: Re: [PATCH v6 05/13] phy: amlogic: meson-hdmi-tx: Add GXBB, GXL, GXM and G12A support
Date: Tue, 01 Dec 2026 20:25:46 +0000 [thread overview]
Message-ID: <sashiko-outbox-244195@kernel.org> (raw)
In-Reply-To: <20261201-meson-drm-create-hdmitx-phy-v6-5-5ccdf57a6cf5@aliel.fr>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] phy: amlogic: missing PHY provider registration in
meson_hdmi_phy_aux_probe()
--
commit 9c83a9c8c670c3d3e57ee4e8af9227943e479a17
Author: Ronald Claveau <linux-kernel-dev@aliel.fr>
phy: amlogic: meson-hdmi-tx: Add GXBB, GXL, GXM and G12A support
This commit extends the Meson HDMI TX PHY driver to support GXBB, GXL, GXM,
and G12A SoCs as auxiliary devices, implementing generic PHY HDMI
configuration callbacks and a legacy creation helper.
> diff --git a/drivers/phy/amlogic/phy-meson-hdmi-tx.c b/drivers/phy/amlogic/phy-meson-hdmi-tx.c
> index e4e606ab4eefa..66bf841411fd2 100644
> --- a/drivers/phy/amlogic/phy-meson-hdmi-tx.c
> +++ b/drivers/phy/amlogic/phy-meson-hdmi-tx.c
[ ... ]
> +static int meson_hdmi_phy_aux_probe(struct auxiliary_device *auxdev,
> + const struct auxiliary_device_id *id)
> +{
> + const struct meson_hdmi_phy_data *data;
> + struct device *dev = &auxdev->dev;
> + struct device_node *parent_np = dev->parent->of_node;
> + struct regmap *hhi;
> + struct phy *phy;
> +
> + data = (const struct meson_hdmi_phy_data *)id->driver_data;
> + if (!data)
> + return -EINVAL;
> +
> + hhi = syscon_node_to_regmap(parent_np);
> + if (IS_ERR(hhi))
> + return dev_err_probe(dev, PTR_ERR(hhi),
> + "failed to get HHI regmap\n");
> +
> + phy = meson_hdmi_phy_alloc(dev, parent_np, hhi, NULL, data);
> + if (IS_ERR(phy))
> + return dev_err_probe(dev, PTR_ERR(phy),
> + "failed to create PHY\n");
> +
> + return 0;
> +}
[Severity: Medium]
Should meson_hdmi_phy_aux_probe() register the OF PHY provider with
devm_of_phy_provider_register() after meson_hdmi_phy_alloc(), instead of
relying on the parent sysctrl driver registering it before creating the
auxiliary device?
drivers/soc/amlogic/meson-gx-hhi-sysctrl.c:meson_gx_hhi_sysctrl_probe() {
...
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
if (IS_ERR(phy_provider))
return dev_err_probe(dev, PTR_ERR(phy_provider),
"failed to register PHY provider\n");
auxdev = devm_auxiliary_device_create(dev, phy_aux_name, NULL);
...
}
Because the provider is already live with of_phy_simple_xlate() before the
struct phy exists, any consumer lookup before meson_hdmi_phy_aux_probe()
completes (or when this driver is a not-yet-loaded module, defers, or is
unbound) gets -ENODEV from of_phy_simple_xlate() instead of -EPROBE_DEFER.
In addition, devm_phy_create() inside meson_hdmi_phy_alloc() publishes
phy->dev to phy_class before phy_set_drvdata(phy, priv) runs, leaving a
window where a concurrent consumer can look up the PHY and invoke phy_ops
with a NULL priv pointer.
Since auxiliary_device_create() already copies the parent OF node to
auxdev->dev.of_node, registering the provider here on dev after
meson_hdmi_phy_alloc() (as meson_hdmi_phy_platform_probe() does) avoids
both issues and ties the provider lifetime to the auxiliary driver.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201-meson-drm-create-hdmitx-phy-v6-0-5ccdf57a6cf5@aliel.fr?part=5
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-12-01 20:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 20:12 [PATCH v6 00/13] phy/drm: amlogic: Extract Meson HDMI TX PHY into a dedicated driver Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 01/13] dt-bindings: soc: amlogic: meson-gx-hhi-sysctrl: Fix compatible matching in conditionals Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 02/13] dt-bindings: soc: amlogic: meson-gx-hhi-sysctrl: Add #phy-cells Ronald Claveau via B4 Relay
2026-12-01 20:27 ` sashiko-bot
2026-12-01 20:12 ` [PATCH v6 03/13] soc: amlogic: Add Meson GX HHI system controller driver Ronald Claveau via B4 Relay
2026-12-01 20:24 ` sashiko-bot
2026-12-01 20:12 ` [PATCH v6 04/13] phy: amlogic: rename Meson8 HDMI TX PHY driver to be SoC-generic Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 05/13] phy: amlogic: meson-hdmi-tx: Add GXBB, GXL, GXM and G12A support Ronald Claveau via B4 Relay
2026-12-01 20:25 ` sashiko-bot [this message]
2026-12-01 20:12 ` [PATCH v6 06/13] dt-bindings: display: amlogic,meson-dw-hdmi: Add phys Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 07/13] pmdomain: amlogic: meson-ee-pwrc: power up memories for boot-enabled domains Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 08/13] drm/meson: dw-hdmi: Drop manual HHI clock and memory PD setup Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 09/13] drm/meson: dw-hdmi: Use the generic PHY framework for the HDMI TX PHY Ronald Claveau via B4 Relay
2026-12-01 20:30 ` sashiko-bot
2026-12-01 20:12 ` [PATCH v6 10/13] arm64: dts: amlogic: g12: Use the HHI system controller as HDMI PHY provider Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 11/13] arm64: dts: amlogic: meson-gx: Add #phy-cells to the HHI system controller Ronald Claveau via B4 Relay
2026-12-01 20:13 ` [PATCH v6 12/13] arm64: dts: amlogic: Add HDMI TX PHY node for GXBB Ronald Claveau via B4 Relay
2026-12-01 20:32 ` sashiko-bot
2026-12-01 20:13 ` [PATCH v6 13/13] arm64: dts: amlogic: Add HDMI TX PHY node for GXL Ronald Claveau via B4 Relay
2026-12-01 20:23 ` sashiko-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=sashiko-outbox-244195@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-kernel-dev@aliel.fr \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@kernel.org \
/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