From nobody Sun Dec 14 12:12:42 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A27A1CBA02 for ; Fri, 23 May 2025 08:49:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; cv=none; b=gtwHPAXCpCN5DS09fxOqjMlj8AbvOB5o+OFzqb+UFB2W9bMrhsRGzqhCCs4xW6rgttjxK9ajDHwRNl6SmdAsC+MkPm4Y+07tdtDO9Cf4Ve+cTtasGn8oMAvzG3ttgeXrM0D1mT/MfYW0SWElXevD/td3bWdZNAtHu6emnVc/soA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; c=relaxed/simple; bh=QvdPw+EY6HW87BbEEl2SyehUHlzXAPAlSJ5ycP2aCMs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uCOQNvredmt0ggCq/X6PO2MYJprvLdsir1Q/v4ee2wttgDcCSOZfBIAgZ8l+iuMWaXCz/NIU7MbNDyWn1IoW81DWbmZ9NCPTPXCnxs7zP5d1US4oaI5y66aIPC0zS74kfWrk5tnYLJUCB996wMDJlB+1LnSS6xcO5iY7cOPFuJQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r2vgwT36; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r2vgwT36" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4C07C4CEEF; Fri, 23 May 2025 08:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747990145; bh=QvdPw+EY6HW87BbEEl2SyehUHlzXAPAlSJ5ycP2aCMs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r2vgwT36EbUBNRnDHtzIXgUX8MrFsJy0XJ3L7jfR1iBDqMpn8DURb5jNH/n1suH1o cUEa+ltYMCMc5kOkaOXG4Is8DN4xjzoVNmHumub3VYYzRUl79mqbiIA5b/4q9bgscU i2ZzjecICwzivashVH+rmd8856uo7pc//f1ymQGDhkVI9jrUb1AYq+iMXCZiWXEgd+ DwWEX5Mz//A0zlfmphTm9P8WqafRmzAC10TLoLv8WrIJRPqRAXJ9Czvfci0NNUFwVO BALK6UPk6ZSWFguFpG/SdxLPJoLeX+eb73p1pBc5u+uHpvFndgza/cqZ3uzLcau/u3 d2flNuFPYV3sA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1uIO5P-000000002sc-2jmD; Fri, 23 May 2025 10:49:03 +0200 From: Johan Hovold To: Vinod Koul Cc: Kishon Vijay Abraham I , Ivaylo Ivanov , Abel Vesa , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 1/7] phy: phy-snps-eusb2: fix clock imbalance on phy_exit() Date: Fri, 23 May 2025 10:48:33 +0200 Message-ID: <20250523084839.11015-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250523084839.11015-1-johan+linaro@kernel.org> References: <20250523084839.11015-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make sure to disable all clocks enabled at phy_init() also on phy_exit(). Fixes: c4098f3e6134 ("phy: phy-snps-eusb2: add support for exynos2200") Cc: Ivaylo Ivanov Signed-off-by: Johan Hovold Acked-by: Ivaylo Ivanov Reviewed-by: Abel Vesa Reviewed-by: Neil Armstrong --- drivers/phy/phy-snps-eusb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c index b73a1d7e57b3..19af3f99692c 100644 --- a/drivers/phy/phy-snps-eusb2.c +++ b/drivers/phy/phy-snps-eusb2.c @@ -504,7 +504,7 @@ static int snps_eusb2_hsphy_exit(struct phy *p) { struct snps_eusb2_hsphy *phy =3D phy_get_drvdata(p); =20 - clk_disable_unprepare(phy->ref_clk); + clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks); =20 regulator_bulk_disable(ARRAY_SIZE(phy->vregs), phy->vregs); =20 --=20 2.49.0 From nobody Sun Dec 14 12:12:42 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A1DD1B0435 for ; Fri, 23 May 2025 08:49:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; cv=none; b=ebrlhmi8P692BBmT4tt+qCwWvkSDTgPYBJtw/XAUXZlXgeOaoLkkkmR8jX5TqEpX8k8g9GjaJCd5Zlj7VOXgsyU8ULBq4F74dXK7f7G1ycCG+q7vPdhfql8FY/hx7aANJ6t5NqhTNm3nulqP9/KYKAwNVZL2Dmu0U3HvW/IHHuM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; c=relaxed/simple; bh=5JcbaWnU4DoMGQDtdSraUtirBZ7DeySehZbf2U9yd8o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O8rlAugo/aRK8yuqSUgouj7KBhzWYyfPLTUO9QtCvN2636RfBn/h9lVL875qquqC7sPbHB8b39XLulTBhNkAG6IMpj0lpjFbKTxvzJ5+wmAgsIBpZAjuajL9nOGggKfhjhXCFJtELGT5Jz5okpqexnukYG5Y/WsoQdZ3sBJcCdc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eqhV2wzM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eqhV2wzM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4BD7C4CEEB; Fri, 23 May 2025 08:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747990145; bh=5JcbaWnU4DoMGQDtdSraUtirBZ7DeySehZbf2U9yd8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eqhV2wzM+2ML2SQ69Ou6NVa+do0LIjfBgpCC9Q2SmHjgduIEqvrM6T7+sRPglKPzr 356xwhF8h54kQhecDlie3lNBYlFoBGZUdtSzHpmNxzw6ayghaGg97X5DXRyin+dtja wuP51h979S82+eIIB6yfuOHXrwjcbq9sGeyqaIA1y/mNLIuC8/h9pi2LjMBqY8rAm1 TNNCDkLEfxkKznB03a8iq1lsLLidrjNrSiZVIZtO3+DfZzn67lduzCvnrxeTN6Esu7 085DNRah2OCpO8h12EafGRUgB/UcvuSOPaykr2/Aq+Yl21lxkWif8o20Du1HHu+794 pxf2GO15tH8VQ== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1uIO5P-000000002se-38CV; Fri, 23 May 2025 10:49:03 +0200 From: Johan Hovold To: Vinod Koul Cc: Kishon Vijay Abraham I , Ivaylo Ivanov , Abel Vesa , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold , Neil Armstrong Subject: [PATCH 2/7] phy: phy-snps-eusb2: fix repeater imbalance on phy_init() failure Date: Fri, 23 May 2025 10:48:34 +0200 Message-ID: <20250523084839.11015-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250523084839.11015-1-johan+linaro@kernel.org> References: <20250523084839.11015-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make sure to disable the repeater PHY also on phy_init() failure. Fixes: 3584f6392f09 ("phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2= repeater") Cc: Abel Vesa Cc: Neil Armstrong Signed-off-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Neil Armstrong --- drivers/phy/phy-snps-eusb2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c index 19af3f99692c..a799c3d2bcfb 100644 --- a/drivers/phy/phy-snps-eusb2.c +++ b/drivers/phy/phy-snps-eusb2.c @@ -468,7 +468,7 @@ static int snps_eusb2_hsphy_init(struct phy *p) ret =3D clk_bulk_prepare_enable(phy->data->num_clks, phy->clks); if (ret) { dev_err(&p->dev, "failed to enable ref clock, %d\n", ret); - goto disable_vreg; + goto exit_repeater; } =20 ret =3D reset_control_assert(phy->phy_reset); @@ -493,7 +493,8 @@ static int snps_eusb2_hsphy_init(struct phy *p) =20 disable_ref_clk: clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks); - +exit_repeater: + phy_exit(phy->repeater); disable_vreg: regulator_bulk_disable(ARRAY_SIZE(phy->vregs), phy->vregs); =20 --=20 2.49.0 From nobody Sun Dec 14 12:12:42 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A2E71D90C8 for ; Fri, 23 May 2025 08:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; cv=none; b=GiQjsJntDvW7pXg6I/YD8nrceurBuZO/uwV5IhFeZFHw0Of7oTZZQqOhCvLzeQrGtyYTXBev7jA5U1y0xSrRviJI9YmBzCKRCyS/64PuIrDZoQFJ40c3X6g3Pm6zyYU0jFOcQ3ukXRUZIPPvONuwavTgr4vZTy985TX+bGcQKHo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; c=relaxed/simple; bh=i//o3UqrswhmGduD9nFXJlKSTMmDLLiHgF4P7egYPTc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nMbCWHEztK1HF/q3KAccIpOMGoJ8+gI0nNsCgvdGy9CuFWMbP4NTochwu9gRlwM1B5hQP9i0ao9MXSDYsD1Na/DdJSLjzV4GEIdwi5CtclKcczcNvElTZ6+qt91HDANMkh54uEDbtOscW3YmKNDyLDBzJbLD6Txd0ayY7qIh3kM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=U6Y1TW+r; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="U6Y1TW+r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C70E7C4CEF2; Fri, 23 May 2025 08:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747990145; bh=i//o3UqrswhmGduD9nFXJlKSTMmDLLiHgF4P7egYPTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U6Y1TW+rAmr0fJTOAgy8nIoVGvREXl3d0/qjHitilvunFXs/hvyHwmVWET6kconZ5 sm6FW6Cxsaw49ihe4iuk64MSDYis5ervImefMlxYbCrHuWG9LKPitPrYlvIR2z31Uw KXAqAnS3zQ75r1bFY8SDXJWR2spDQkYmOETOAukX4mb5A9kltSQ1HfN0CQ/SLDh5ol i1aEwLaauv7nkYvOMU9pkSQg0Wcdg6ju/MnZHgOOWnfJkVxb9IFFqWLHEBOtRq03Xg 43BC4f9WMQ66nVPIGM8HjESOfWK45I1KsudTJqVC6Q9mXzd5WmwR5VmJgJgO/AhE4x BaqQZ8KkqVwzA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1uIO5P-000000002sg-3VfV; Fri, 23 May 2025 10:49:03 +0200 From: Johan Hovold To: Vinod Koul Cc: Kishon Vijay Abraham I , Ivaylo Ivanov , Abel Vesa , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 3/7] phy: phy-snps-eusb2: rename phy_init() clock error label Date: Fri, 23 May 2025 10:48:35 +0200 Message-ID: <20250523084839.11015-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250523084839.11015-1-johan+linaro@kernel.org> References: <20250523084839.11015-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Rename the clock error label which is now used to disable all clocks and not just the ref clock on phy_init() errors. Signed-off-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Neil Armstrong --- drivers/phy/phy-snps-eusb2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c index a799c3d2bcfb..c8f14f8fb9ac 100644 --- a/drivers/phy/phy-snps-eusb2.c +++ b/drivers/phy/phy-snps-eusb2.c @@ -474,7 +474,7 @@ static int snps_eusb2_hsphy_init(struct phy *p) ret =3D reset_control_assert(phy->phy_reset); if (ret) { dev_err(&p->dev, "failed to assert phy_reset, %d\n", ret); - goto disable_ref_clk; + goto disable_clks; } =20 usleep_range(100, 150); @@ -482,16 +482,16 @@ static int snps_eusb2_hsphy_init(struct phy *p) ret =3D reset_control_deassert(phy->phy_reset); if (ret) { dev_err(&p->dev, "failed to de-assert phy_reset, %d\n", ret); - goto disable_ref_clk; + goto disable_clks; } =20 ret =3D phy->data->phy_init(p); if (ret) - goto disable_ref_clk; + goto disable_clks; =20 return 0; =20 -disable_ref_clk: +disable_clks: clk_bulk_disable_unprepare(phy->data->num_clks, phy->clks); exit_repeater: phy_exit(phy->repeater); --=20 2.49.0 From nobody Sun Dec 14 12:12:42 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A33B1DB366 for ; Fri, 23 May 2025 08:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; cv=none; b=crW+r3Ym4sbUTFQ6hbH7hTmNk06kSaWeh4BpaIZvAXz4en1UxCIoxplfd1gl6MBGE6pimDe5qbpbGFR3zyRuh0xL13134f8pePlYilxxIAIbTz3bsofSfI+IdYoL9dwo6KmpgT9Fq+UHF5AHiAXiRlWQBf5G0dTdcX/Eqt4eNAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; c=relaxed/simple; bh=scH8O9z4KQYnM947y3bsoS+So4c5Zz9w9UFXE+CEqv4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Xo7+wf+zltguOhrImSIlfSNdfpSUfYReG6CW5N0htRd/pJw6CJgJ+NPMdJ6xUCURlKGIajShoVvasInOYl1WYdwhnNfHdKj3WuHOqv4FTK02s052m+YzPUrmHdDHuKBb7VhZ/+oasU3ZECfZYy360QTZfE0m15ahABshLxc/h3U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZrdznUlb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZrdznUlb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE4E9C4CEF3; Fri, 23 May 2025 08:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747990145; bh=scH8O9z4KQYnM947y3bsoS+So4c5Zz9w9UFXE+CEqv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZrdznUlbhfdkx9n83B2ICMemJH2MC9UE5EjfmcOMl47j6tlN998RCm4iytyyiqHNf qbVQps2x91FEF5Eb6rwUJ5yiogcA1LSIS1TrRFVJyRPXa0ztyZmKkeog3Vbewk79ey P2FaDonQwhFwKxS/B40zlpfhOA3EjpSI5oAfiyfZCkNzwW3iOqxNr8u5YBtaK+643Z GrmLfc/12EBq4jhNeKNK9UZBBKbB+147y50Fo2GoMrdPV9HjrhF2dju0X3SIPyEBCE MTZFY2TrJ5whZv2rCJDx33W1WvZQsz6K9WP3HtXDG4gC3UwFYpWVCwSDFlmDlXz0to 1yhXZf5IJShIw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1uIO5P-000000002si-3wOg; Fri, 23 May 2025 10:49:03 +0200 From: Johan Hovold To: Vinod Koul Cc: Kishon Vijay Abraham I , Ivaylo Ivanov , Abel Vesa , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 4/7] phy: phy-snps-eusb2: clean up error messages Date: Fri, 23 May 2025 10:48:36 +0200 Message-ID: <20250523084839.11015-5-johan+linaro@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250523084839.11015-1-johan+linaro@kernel.org> References: <20250523084839.11015-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Clean up the error messages by using a consistent format with a colon followed by a space and an errno (or unsupported frequency). Signed-off-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Neil Armstrong --- drivers/phy/phy-snps-eusb2.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c index c8f14f8fb9ac..232c5e8a554f 100644 --- a/drivers/phy/phy-snps-eusb2.c +++ b/drivers/phy/phy-snps-eusb2.c @@ -256,7 +256,7 @@ static int exynos_eusb2_ref_clk_init(struct snps_eusb2_= hsphy *phy) } =20 if (!config) { - dev_err(&phy->phy->dev, "unsupported ref_clk_freq:%lu\n", ref_clk_freq); + dev_err(&phy->phy->dev, "unsupported ref_clk_freq: %lu\n", ref_clk_freq); return -EINVAL; } =20 @@ -293,7 +293,7 @@ static int qcom_eusb2_ref_clk_init(struct snps_eusb2_hs= phy *phy) } =20 if (!config) { - dev_err(&phy->phy->dev, "unsupported ref_clk_freq:%lu\n", ref_clk_freq); + dev_err(&phy->phy->dev, "unsupported ref_clk_freq: %lu\n", ref_clk_freq); return -EINVAL; } =20 @@ -461,19 +461,19 @@ static int snps_eusb2_hsphy_init(struct phy *p) =20 ret =3D phy_init(phy->repeater); if (ret) { - dev_err(&p->dev, "repeater init failed. %d\n", ret); + dev_err(&p->dev, "repeater init failed: %d\n", ret); goto disable_vreg; } =20 ret =3D clk_bulk_prepare_enable(phy->data->num_clks, phy->clks); if (ret) { - dev_err(&p->dev, "failed to enable ref clock, %d\n", ret); + dev_err(&p->dev, "failed to enable ref clock: %d\n", ret); goto exit_repeater; } =20 ret =3D reset_control_assert(phy->phy_reset); if (ret) { - dev_err(&p->dev, "failed to assert phy_reset, %d\n", ret); + dev_err(&p->dev, "failed to assert phy_reset: %d\n", ret); goto disable_clks; } =20 @@ -481,7 +481,7 @@ static int snps_eusb2_hsphy_init(struct phy *p) =20 ret =3D reset_control_deassert(phy->phy_reset); if (ret) { - dev_err(&p->dev, "failed to de-assert phy_reset, %d\n", ret); + dev_err(&p->dev, "failed to de-assert phy_reset: %d\n", ret); goto disable_clks; } =20 @@ -588,7 +588,7 @@ static int snps_eusb2_hsphy_probe(struct platform_devic= e *pdev) =20 generic_phy =3D devm_phy_create(dev, NULL, &snps_eusb2_hsphy_ops); if (IS_ERR(generic_phy)) { - dev_err(dev, "failed to create phy %d\n", ret); + dev_err(dev, "failed to create phy: %d\n", ret); return PTR_ERR(generic_phy); } =20 --=20 2.49.0 From nobody Sun Dec 14 12:12:42 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A22B1C5F37 for ; Fri, 23 May 2025 08:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; cv=none; b=uvK/sixBiKrCSUPyzWox0lUUaTU8OHwGsd2YSVoIgrfrVU7OTlvhPlr9OjdUI2FkFMc/HsOVqW+EgNw/nnEcaJoE7nII3a9cE9Noj4NHePfedabl89jk6xuf4jkROcaJPy6lNbadGkipP/gwEhxEjvB2k92vcpLAHExtAmDtEB8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; c=relaxed/simple; bh=e/J0slcAPFlAeKb3Rmtwb/HqgsdPPK5dqNn+4ShKjiI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fioDNvN7+sVPv23IZ5OybqLl3lvLVstlKcFNmF5YvS/M5f/hO5SypYijg8CPjA0b38Y1ryNTWAueUGU2IZrYjRKVEZeADsEZwMJUFOYDUDYBQioZQuPeROpnL/94Qa33AZ2BaaSZU1ii4fGIyZGprbC4Loz1mK53olad+e/tFbw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Cb9I3s1u; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Cb9I3s1u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE71FC4CEF4; Fri, 23 May 2025 08:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747990145; bh=e/J0slcAPFlAeKb3Rmtwb/HqgsdPPK5dqNn+4ShKjiI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cb9I3s1u6vV3raqI+2xvTiDFd8qLuBVoDZKz9vgCd66/9oxjOPplcG1GQql4fvn5d yaxMu8xokBnWNJk+sNZU8BEyCOnKULe3tdhLbbcrK2wqKrC4NcVnzPxlbxAbflwEyt E3spZFClIPeTWrxsLxI5li3FdRI06z5ElfhbB/CZCgkH5fcyxumYq+q8qiRH5rGQx1 jGpL8MsmM49HythrrDTmrpvdMGiNyLwTx2tgh/CVnnWKU8LsKWCndU0bgndMSvaCDi c4XDyAExcxHuf3ngJCwCvywPt87YsKqRHCeKqvob5EpF7gPswYF23U7p11fTYjHxRL NosiNwyLt/f8Q== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1uIO5Q-000000002sm-09VH; Fri, 23 May 2025 10:49:04 +0200 From: Johan Hovold To: Vinod Koul Cc: Kishon Vijay Abraham I , Ivaylo Ivanov , Abel Vesa , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 5/7] phy: phy-snps-eusb2: fix optional phy lookup parameter Date: Fri, 23 May 2025 10:48:37 +0200 Message-ID: <20250523084839.11015-6-johan+linaro@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250523084839.11015-1-johan+linaro@kernel.org> References: <20250523084839.11015-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The devm_of_phy_optional_get() takes an optional name argument as its third parameter and not an index like the recently replaced devm_of_phy_get_by_index(). Replace 0 with an explicit NULL for consistency and readability. Signed-off-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Neil Armstrong --- drivers/phy/phy-snps-eusb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c index 232c5e8a554f..328e67ebfe03 100644 --- a/drivers/phy/phy-snps-eusb2.c +++ b/drivers/phy/phy-snps-eusb2.c @@ -581,7 +581,7 @@ static int snps_eusb2_hsphy_probe(struct platform_devic= e *pdev) return dev_err_probe(dev, ret, "failed to get regulator supplies\n"); =20 - phy->repeater =3D devm_of_phy_optional_get(dev, np, 0); + phy->repeater =3D devm_of_phy_optional_get(dev, np, NULL); if (IS_ERR(phy->repeater)) return dev_err_probe(dev, PTR_ERR(phy->repeater), "failed to get repeater\n"); --=20 2.49.0 From nobody Sun Dec 14 12:12:42 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A17E1AAA29 for ; Fri, 23 May 2025 08:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; cv=none; b=qUzMskflcKDI9CFE9AcZhKz6urhGJ/zWSFPQnenWFVDycW+/qmiuW1s+V5Synk6eSYrtracE1FagebuwQamchTH0/5A/Wgc2VxhSCLCi9JxNqa/MerHxG+J3vqprh+rGRSFqufnPl6hZkxMyCGaJy+DvI06LgrIQewRfKPd19Xs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; c=relaxed/simple; bh=O49xnH+Zi4MGHO24pslMdx6btGMUWu06sVjFRwGHYJs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N3hfnJ9SXllyYWnVMKn1mTtIvXcJxm16xvY9tpeMgyFdweGygZV0Nt3gGV/s2+P7zfqYlUSxbpU8rmoFqC3AOULP2J+V5Db67iqIStXEv62/k9zwtlW28wp4RXN0LmFc4seC7z63fbDq2pwEodHSMrdZEugRJiBfGt1NLidzsHs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nWKuKRgq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nWKuKRgq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00623C4CEFC; Fri, 23 May 2025 08:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747990146; bh=O49xnH+Zi4MGHO24pslMdx6btGMUWu06sVjFRwGHYJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nWKuKRgq1knioksANTiW9BBMhLK/qH/lkCV8zXAwcq4XJckB7KM9kJvKVp+GIVgYG b5wxgjx40P8ZUlVfIgl63OVxD7pVEbHsN204Yqy47EJf12DpyEVvIHK1R4Y1b+AwW/ V19N4kybih2yjCuq1jdkBXIkIBTg4XRTeBIcg2oC2FF0KBv9pxsIULL8D++blj66XI JnFDKLyZf417lHFpshosvPC+YsTY9cHOJBWik+J4Yd2kYcUPm7cYsHYmpeugd0HFle uJKQR/CmepXkuemHZIZ++od6ZZrqT9FwHwngGnxNid46YolcvAZmFKcbBMKWcto/FR 0ij+TKHXPHFVA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1uIO5Q-000000002sq-0VJj; Fri, 23 May 2025 10:49:04 +0200 From: Johan Hovold To: Vinod Koul Cc: Kishon Vijay Abraham I , Ivaylo Ivanov , Abel Vesa , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 6/7] phy: phy-snps-eusb2: drop unnecessary loop index declarations Date: Fri, 23 May 2025 10:48:38 +0200 Message-ID: <20250523084839.11015-7-johan+linaro@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250523084839.11015-1-johan+linaro@kernel.org> References: <20250523084839.11015-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is already a loop index variable declared at function scope so drop the unnecessary overloaded loop declarations. Signed-off-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Neil Armstrong --- drivers/phy/phy-snps-eusb2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c index 328e67ebfe03..c67712bd8bba 100644 --- a/drivers/phy/phy-snps-eusb2.c +++ b/drivers/phy/phy-snps-eusb2.c @@ -552,7 +552,7 @@ static int snps_eusb2_hsphy_probe(struct platform_devic= e *pdev) if (!phy->clks) return -ENOMEM; =20 - for (int i =3D 0; i < phy->data->num_clks; ++i) + for (i =3D 0; i < phy->data->num_clks; ++i) phy->clks[i].id =3D phy->data->clk_names[i]; =20 ret =3D devm_clk_bulk_get(dev, phy->data->num_clks, phy->clks); @@ -561,7 +561,7 @@ static int snps_eusb2_hsphy_probe(struct platform_devic= e *pdev) "failed to get phy clock(s)\n"); =20 phy->ref_clk =3D NULL; - for (int i =3D 0; i < phy->data->num_clks; ++i) { + for (i =3D 0; i < phy->data->num_clks; ++i) { if (!strcmp(phy->clks[i].id, "ref")) { phy->ref_clk =3D phy->clks[i].clk; break; --=20 2.49.0 From nobody Sun Dec 14 12:12:42 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76F171EF368 for ; Fri, 23 May 2025 08:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; cv=none; b=FKQYl8kMNbCTMQdDyY39ZnbX8lJSEOMPO2DNTa1SEnbrOWjyEtLi7An8B/RzvS+oHXk7YgKdO92ZngSXvlTLnIJiDmLp0AXS7w4wv4qo2wg9gNGRJOOofLw7Bb76aSpiaorpT0eM/LquXAF7s67FOTj2I33aBb6PvmQbPo0dxK8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747990146; c=relaxed/simple; bh=44O0pIXLXYb6xgrbxG5UOz2GoRN5lhv+sgEH3kFJxIU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QvPR+E98vDuDiygz7M5SCYulxDZjvUPjQivN6NS4RI1+H+8i83uPqtLqqjq7/xmPbsvptvWSxKTgnuQlB1Kxam2vFwXJ99lu3us0zM4rgAR/3Qji555ZT8tOjJccFDFwi4+BehUaB4GpBIr8AO9LQfKypvMb/cVJ2X771g5oM8E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tF/iu7ai; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tF/iu7ai" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C333C4CEE9; Fri, 23 May 2025 08:49:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747990146; bh=44O0pIXLXYb6xgrbxG5UOz2GoRN5lhv+sgEH3kFJxIU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tF/iu7aihQIOj5z3vuguuymFqzR9jw7zoNinvNSQixZg+WSg7A3cy62chYad8XJ34 VHD+eMAV2KPUtjvF5dAbQBuJPveXm+4jO8FdxAje2Edxko9Va/czBqoY+SBwax4leT ea57NXNyRTQXOKIZh8gyKpzbNBMIZ7Ly7aUgPBWKma4L9OVFa8VPsIRUKGBlSNF/2W Yp7H9AfeYxFWiphZSbhSQqEV3UdBmNitm0ZBG4UcSZ0yHuJnP74F6JRozWBtJ2taE+ 5FvNobb2HGxanb+VJynsf8/1EcOO9WzlX/4FikCalaAQOPX8zAywEhWsXCNtjdiRWZ r7Aj59Xp4j2TQ== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1uIO5Q-000000002st-0oTB; Fri, 23 May 2025 10:49:04 +0200 From: Johan Hovold To: Vinod Koul Cc: Kishon Vijay Abraham I , Ivaylo Ivanov , Abel Vesa , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 7/7] phy: phy-snps-eusb2: clean up id table sentinel Date: Fri, 23 May 2025 10:48:39 +0200 Message-ID: <20250523084839.11015-8-johan+linaro@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250523084839.11015-1-johan+linaro@kernel.org> References: <20250523084839.11015-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use a more common format for the id table sentinel for consistency and symmetry. Signed-off-by: Johan Hovold Reviewed-by: Abel Vesa --- drivers/phy/phy-snps-eusb2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c index c67712bd8bba..cf62f2221366 100644 --- a/drivers/phy/phy-snps-eusb2.c +++ b/drivers/phy/phy-snps-eusb2.c @@ -611,7 +611,9 @@ static const struct of_device_id snps_eusb2_hsphy_of_ma= tch_table[] =3D { }, { .compatible =3D "samsung,exynos2200-eusb2-phy", .data =3D &exynos2200_snps_eusb2_phy, - }, { }, + }, { + /* sentinel */ + } }; MODULE_DEVICE_TABLE(of, snps_eusb2_hsphy_of_match_table); =20 --=20 2.49.0