All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jun Yan" <jerrysteve1101@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4] drm/bridge: analogix_dp: use devm_phy_optional_get() for the DP PHY
Date: Sun, 15 Nov 2026 05:01:01 +0000	[thread overview]
Message-ID: <sashiko-outbox-215231@kernel.org> (raw)
In-Reply-To: <20261115044755.395888-1-jerrysteve1101@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/bridge: analogix_dp: inaccurate RK3288 PHY comment in
  analogix_dp_probe()
--

commit 720fa3eab5052c038874ca588f7e1541886e6915
Author: Jun Yan <jerrysteve1101@gmail.com>

drm/bridge: analogix_dp: use devm_phy_optional_get() for the DP PHY

This commit replaces devm_phy_get() and its open-coded error handling with
devm_phy_optional_get() in analogix_dp_probe() when acquiring the optional
DP PHY.

> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 8bb4c48aa3b48..09171c6605d0b 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -1427,21 +1427,13 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
>  	if (ret)
>  		return ERR_PTR(ret);
>  
> -	dp->phy = devm_phy_get(dp->dev, "dp");
> -	if (IS_ERR(dp->phy)) {
> -		dev_err(dp->dev, "no DP phy configured\n");
> -		ret = PTR_ERR(dp->phy);
> -		if (ret) {
> -			/*
> -			 * phy itself is not enabled, so we can move forward
> -			 * assigning NULL to phy pointer.
> -			 */
> -			if (ret == -ENOSYS || ret == -ENODEV)
> -				dp->phy = NULL;
> -			else
> -				return ERR_PTR(ret);
> -		}
> -	}
> +	/*
> +	 * RK3288/RK3399 use Analogix DP controller built-in PHY,
> +	 * no extra PHY configuration is required.
> +	 */
> +	dp->phy = devm_phy_optional_get(dp->dev, "dp");
> +	if (IS_ERR(dp->phy))
> +		return ERR_CAST(dp->phy);

[Severity: Low]
Are this comment and the commit message accurate about RK3288?

In arch/arm/boot/dts/rockchip/rk3288.dtsi and
Documentation/devicetree/bindings/display/rockchip/rockchip,analogix-dp.yaml,
the RK3288 eDP node defines phys = <&edp_phy> and phy-names = "dp" for its
rockchip,rk3288-dp-phy device, which drivers/phy/rockchip/phy-rockchip-dp.c
programs via GRF_SOC_CON12 when phy_power_on() and phy_power_off() are
called on dp->phy.

RK3399 and RK3568 are the variants that omit the phys property and configure
the built-in PHY directly through the controller MMIO registers rather than
through a separate PHY device or GRF.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261115044755.395888-1-jerrysteve1101@gmail.com?part=1

      reply	other threads:[~2026-11-15  5:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15  4:47 [PATCH v4] drm/bridge: analogix_dp: use devm_phy_optional_get() for the DP PHY Jun Yan
2026-11-15  4:47 ` Jun Yan
2026-11-15  5:01 ` sashiko-bot [this message]

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-215231@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jerrysteve1101@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.