From patchwork Mon Jan 6 07:00:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chukun Pan X-Patchwork-Id: 13926984 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1D3DE77188 for ; Mon, 6 Jan 2025 07:00:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Zdr70wTW5SSSDwbndFXqwSPI8mfu0kYad1riszcPLYM=; b=B+2B1+nJgg+05p OeDRLAcWiKBVsUZ8/uq2PJLKgJj3GtEuYuwiZPOK9lFYsh68Sm74WrAe11Nl8wnJUHoF948aiidG9 foDmLLxRO5CGckNoDeIzOscHIirpobuJzCPzt62haXZ0BbEZSqGwzIlokWoIYSqIEmUKIG5Mizzjd DuZHJcOGFVbluMVyODAnIXadb6m/Yc0+Tz53gswltz5YL/wdo+8PXFa+l0Jx16GtJuW4/DqOqD5cO oeRXyIeftLod1+pRK/jMzlemelBzfPw/a4G7QTBmXhtuD5rcQyIOH+XLK8NN7Dt4TtLEUqfGasPC4 Ayy0CDzhmVygVqXGnLww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tUh6T-00000000Lla-2EiV; Mon, 06 Jan 2025 07:00:45 +0000 Received: from mail-m49197.qiye.163.com ([45.254.49.197]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tUh5x-00000000LfX-45f3; Mon, 06 Jan 2025 07:00:15 +0000 Received: from amadeus-Vostro-3710.lan (unknown [IPV6:240e:3b3:2c05:ad20::1]) by smtp.qiye.163.com (Hmail) with ESMTP id 7cec4144; Mon, 6 Jan 2025 15:00:05 +0800 (GMT+08:00) From: Chukun Pan To: Vinod Koul Cc: Heiko Stuebner , Philipp Zabel , Kishon Vijay Abraham I , Jianfeng Liu , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Chukun Pan Subject: [PATCH 1/1] phy: rockchip: naneng-combphy: compatible with old DT for RK3568 Date: Mon, 6 Jan 2025 15:00:00 +0800 Message-Id: <20250106070000.605284-1-amadeus@jmu.edu.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlCTkwfVk1CSElIHRodQxgfTFYeHw5VEwETFhoSFy QUDg9ZV1kYEgtZQVlJT0seQUgZSEFJGEtOQRofSUtBQUpZV1kWGg8SFR0UWUFZT0tIVUpLSU9PT0 tVSktLVUtZBg++ X-HM-Tid: 0a943a69e2cd03a2kunm7cec4144 X-HM-MType: 10 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NxA6SBw6SDILKRgoQ0kxCFE0 CjcKCyhVSlVKTEhNSk9NQ0tNTkNJVTMWGhIXVRoWGh8eDgg7ERYOVR4fDlUYFUVZV1kSC1lBWUlP Sx5BSBlIQUkYS05BGh9JS0FBSllXWQgBWUFKSkNKNwY+ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250105_230014_225839_7BA4901A X-CRM114-Status: UNSURE ( 8.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The device tree of RK3568 did not specify reset-names before. So add fallback to old behaviour to be compatible with old DT. Fixes: fbcbffbac994 ("phy: rockchip: naneng-combphy: fix phy reset") Cc: Jianfeng Liu Signed-off-by: Chukun Pan --- drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c index a1532ef8bbe9..372f5c07b5bd 100644 --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c @@ -325,6 +325,10 @@ static int rockchip_combphy_parse_dt(struct device *dev, struct rockchip_combphy priv->ext_refclk = device_property_present(dev, "rockchip,ext-refclk"); priv->phy_rst = devm_reset_control_get(dev, "phy"); + /* fallback to old behaviour */ + if (IS_ERR(ERR_PTR(priv->phy_rst))) + priv->phy_rst = devm_reset_control_array_get_exclusive(dev); + if (IS_ERR(priv->phy_rst)) return dev_err_probe(dev, PTR_ERR(priv->phy_rst), "failed to get phy reset\n");