45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
From git@z Thu Jan 1 00:00:00 1970
|
|
Subject: [PATCH v13 4/35] phy: rockchip: usbdp: Fix devm_clk_bulk_get_all
|
|
check
|
|
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
|
Date: Tue, 14 Jul 2026 21:26:05 +0200
|
|
Message-Id: <20260714-rockchip-usbdp-cleanup-v13-4-6cb3e769d4c5@collabora.com>
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset="utf-8"
|
|
Content-Transfer-Encoding: 7bit
|
|
|
|
If devm_clk_bulk_get_all() returns -EPROBE_DEFER, it is replaced with
|
|
-ENODEV, permanently failing the driver probe instead of allowing it to
|
|
defer. Avoid masking the error code to fix the issue.
|
|
|
|
This effectively drops returning -ENODEV in case no clocks are being
|
|
described in DT. This special case will now be handled by the follow-up
|
|
check searching for "refclk" and exit with -EINVAL.
|
|
|
|
None of this will be hit in practice, since the driver is only used by
|
|
RK3588 and RK3576 - on these platforms the DT is validated to contain
|
|
the clocks and the clock driver is force probed early. Thus there is
|
|
no need to backport this.
|
|
|
|
Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver")
|
|
Reported-by: Sashiko <sashiko-bot@kernel.org>
|
|
Closes: https://lore.kernel.org/linux-phy/20260612164107.C7DB21F000E9@smtp.kernel.org/
|
|
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
|
---
|
|
drivers/phy/rockchip/phy-rockchip-usbdp.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/phy/rockchip/phy-rockchip-usbdp.c
|
|
+++ b/drivers/phy/rockchip/phy-rockchip-usbdp.c
|
|
@@ -427,8 +427,8 @@ static int rk_udphy_clk_init(struct rk_u
|
|
int i;
|
|
|
|
udphy->num_clks = devm_clk_bulk_get_all(dev, &udphy->clks);
|
|
- if (udphy->num_clks < 1)
|
|
- return -ENODEV;
|
|
+ if (udphy->num_clks < 0)
|
|
+ return udphy->num_clks;
|
|
|
|
/* used for configure phy reference clock frequency */
|
|
for (i = 0; i < udphy->num_clks; i++) {
|