From patchwork Mon Jan 6 10:00:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chukun Pan X-Patchwork-Id: 13927132 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 BDFEEE77188 for ; Mon, 6 Jan 2025 10:01:27 +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:References:In-Reply-To: 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: List-Owner; bh=wqGZTMCHOigi0KZmORRKK24gQtLua/MgNJqkDHkSzWs=; b=C2kxaa1eOkIndJ TKcsE26XnAoCDUtuLlmDzh4cHouPbOtYcVku8qf3m5BNpk8CO3xuXIZfRRoEaUwzX6FeK/qjYkmgO sNtToWi2c9aZHAwhroF+5dHmPOJhtpwwjejphGr/tHlfvDMdicuy6aeH0yDmPzW2/kjdBsARQq76W 30zRHoAci764HUFhWEzp4N184NGyAcKcNQK2SFMOEIzO7VJaA+1cOMbYAJQb6SMtcD+jRH//Na+K1 bK5DpwuA3McZvvUBLQWG7QtqILQCxwB9iamomw99vPoKp5/8hzWRg6I+quZmIhq2TePA6q1cfAfIL 3mpYyt9RAwTFdTgEYUVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tUjvL-00000000mKr-21Np; Mon, 06 Jan 2025 10:01:27 +0000 Received: from mail-m155101.qiye.163.com ([101.71.155.101]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tUju7-00000000m0x-3vNa; Mon, 06 Jan 2025 10:00:13 +0000 Received: from amadeus-Vostro-3710.lan (unknown [IPV6:240e:3b3:2c05:ad20::1]) by smtp.qiye.163.com (Hmail) with ESMTP id 7d57e693; Mon, 6 Jan 2025 18:00:08 +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 v2 1/1] phy: rockchip: naneng-combphy: compatible reset with old DT Date: Mon, 6 Jan 2025 18:00:01 +0800 Message-Id: <20250106100001.1344418-2-amadeus@jmu.edu.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250106100001.1344418-1-amadeus@jmu.edu.cn> References: <20250106100001.1344418-1-amadeus@jmu.edu.cn> MIME-Version: 1.0 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVkZQx1OVktDTRlCTU4ZGEseGVYeHw5VEwETFhoSFy QUDg9ZV1kYEgtZQVlJT0seQUgZSEFJGEtOQRofSUtBQUpZV1kWGg8SFR0UWUFZT0tIVUpLSU9PT0 tVSktLVUtZBg++ X-HM-Tid: 0a943b0eb88503a2kunm7d57e693 X-HM-MType: 10 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Pzo6Nyo*ETIONR8*HgFKHzxC GChPCSJVSlVKTEhNSk5MTUtDQ01CVTMWGhIXVRoWGh8eDgg7ERYOVR4fDlUYFUVZV1kSC1lBWUlP Sx5BSBlIQUkYS05BGh9JS0FBSllXWQgBWUFKSU1ONwY+ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250106_020012_159354_11BB8482 X-CRM114-Status: GOOD ( 10.55 ) 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c index a1532ef8bbe9..8c3ce57f8915 100644 --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c @@ -324,7 +324,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"); + priv->phy_rst = devm_reset_control_get_exclusive(dev, "phy"); + /* fallback to old behaviour */ + if (PTR_ERR(priv->phy_rst) == -ENOENT) + 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");