From patchwork Mon Feb 10 13:32:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 13967957 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 A945AC021A3 for ; Mon, 10 Feb 2025 13:45:21 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=96JFoddWwzF2OGcKrR5QhG3oK/rThQdI48g6Jo0MEz4=; b=Aj5HpqjnMScPOd equ80Mp+rT7JH87tsQCMXBwrlzdOmRcedovjEF8BTh1/iPo85SFfPBEI0xupiyKer8Xj7PRlSraoy 94rvz8wBCJvuM8fL/+VML56GFDogCua7XjoTn+UYd9gejxe7QinW6svPwRCNIH3ECt7+y06KewgvO 4i+lDrN9gxw2HtaL4SdO1NPzjEerlMEsfwjUMJSgFGA2FJQNFPQkslvxTtncIeoUaQVDFDK50lFfa 32ek+/yIIGGuNWyaq/UgOZbuUcacxL6CvTLOn49ZgMvrL07qY4xxmgRMyBeYyUaD3YXAloXlhB+DG Y8jNZQlVxVtXDk9dI2cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1thU6D-000000000sz-1X6j; Mon, 10 Feb 2025 13:45:21 +0000 Received: from mr85p00im-ztdg06011201.me.com ([17.58.23.181]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1thTtu-0000000HZ0y-4AzH for linux-phy@lists.infradead.org; Mon, 10 Feb 2025 13:32:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; bh=BdtS65RHiFl1WFTCHO1gU6ssbrkbzjGtY4ydMrp5+Lk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:x-icloud-hme; b=XdLJHL7qU/VQWqsyV/WtfW90oziiuTHh68BQr6KITQlL9S/+19VDXp3s04qtsiq9O 6I4pfYmgBZ3fEIM3f+4UpPfTUqtUfBKnzsCSOJ0Kz3tGMgalm9toUUs3Ij9q+rcbOH lc+c+8QgZGflxlInbLEG3PQD1+EYQs+1l6zbXvJrTFyLNiU2J4xLF0Goq3GB9K3Fhm 86sNoK8HX3ztNcEdX37S83U91Emnd1aBoMvx0iD8qaCVLUCMTtFLvvXPpPWggD4vs3 BTTWHs+4WvK+O7xBpA4vOpZupmqMT01KYnWdaEnorZtFgMAgJjnwQB+zLpk+jNdnVW /gG96Ken+6rdw== Received: from [192.168.1.26] (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-ztdg06011201.me.com (Postfix) with ESMTPSA id E4FF19602D3; Mon, 10 Feb 2025 13:32:29 +0000 (UTC) From: Zijun Hu Date: Mon, 10 Feb 2025 21:32:02 +0800 Subject: [PATCH 1/2] phy: core: Remove API devm_of_phy_provider_unregister() MIME-Version: 1.0 Message-Id: <20250210-remove-apis-v1-1-2aaa866315a7@quicinc.com> References: <20250210-remove-apis-v1-0-2aaa866315a7@quicinc.com> In-Reply-To: <20250210-remove-apis-v1-0-2aaa866315a7@quicinc.com> To: Jonathan Corbet , Alex Shi , Yanteng Si , Vinod Koul , Kishon Vijay Abraham I Cc: Zijun Hu , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Zijun Hu X-Mailer: b4 0.14.2 X-Proofpoint-ORIG-GUID: PYqpPWuoolM9S6owRDN_nfSN9kwudjr0 X-Proofpoint-GUID: PYqpPWuoolM9S6owRDN_nfSN9kwudjr0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-10_07,2025-02-10_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=763 clxscore=1015 mlxscore=0 spamscore=0 bulkscore=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2502100113 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250210_053239_059593_68B2CB9F X-CRM114-Status: UNSURE ( 9.67 ) 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 From: Zijun Hu API devm_of_phy_provider_unregister() has not had callers since 2013-09-27 when it was introduced. Remove the API. Signed-off-by: Zijun Hu --- Documentation/driver-api/phy/phy.rst | 5 +---- .../translations/zh_CN/driver-api/phy/phy.rst | 5 +---- drivers/phy/phy-core.c | 19 ------------------- include/linux/phy/phy.h | 6 ------ 4 files changed, 2 insertions(+), 33 deletions(-) diff --git a/Documentation/driver-api/phy/phy.rst b/Documentation/driver-api/phy/phy.rst index 81785c084f3ec2dd02af2131fbc8632cb5b33b0b..be3687a2a11bbf84e6e5561b11931ea6db984434 100644 --- a/Documentation/driver-api/phy/phy.rst +++ b/Documentation/driver-api/phy/phy.rst @@ -64,12 +64,9 @@ macros can be used to override the node containing the children. __devm_of_phy_provider_register_full(dev, children, THIS_MODULE, xlate) - void devm_of_phy_provider_unregister(struct device *dev, - struct phy_provider *phy_provider); void of_phy_provider_unregister(struct phy_provider *phy_provider); -devm_of_phy_provider_unregister and of_phy_provider_unregister can be used to -unregister the PHY. +of_phy_provider_unregister can be used to unregister the PHY. Creating the PHY ================ diff --git a/Documentation/translations/zh_CN/driver-api/phy/phy.rst b/Documentation/translations/zh_CN/driver-api/phy/phy.rst index 0d7489081b904d6fc5aa21824c969e325e801297..2d3f98deb92035c44fcb1ff0e3dc8543053140f6 100644 --- a/Documentation/translations/zh_CN/driver-api/phy/phy.rst +++ b/Documentation/translations/zh_CN/driver-api/phy/phy.rst @@ -63,12 +63,9 @@ devm_of_phy_provider_register_full() 宏来覆盖包含子节点的节点。 __devm_of_phy_provider_register_full(dev, children, THIS_MODULE, xlate) - void devm_of_phy_provider_unregister(struct device *dev, - struct phy_provider *phy_provider); void of_phy_provider_unregister(struct phy_provider *phy_provider); -devm_of_phy_provider_unregister 和 of_phy_provider_unregister -可以被用来注销PHY. +of_phy_provider_unregister() 可以被用来注销PHY. 创建PHY ======= diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index 8dfdce605a905d7f38205727151258af41f807a9..dd6302dfd14d2ec060857fc019268096c33e37a2 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -1248,25 +1248,6 @@ void of_phy_provider_unregister(struct phy_provider *phy_provider) } EXPORT_SYMBOL_GPL(of_phy_provider_unregister); -/** - * devm_of_phy_provider_unregister() - remove phy provider from the framework - * @dev: struct device of the phy provider - * @phy_provider: phy provider returned by of_phy_provider_register() - * - * destroys the devres associated with this phy provider and invokes - * of_phy_provider_unregister to unregister the phy provider. - */ -void devm_of_phy_provider_unregister(struct device *dev, - struct phy_provider *phy_provider) -{ - int r; - - r = devres_release(dev, devm_phy_provider_release, devm_phy_match, - phy_provider); - dev_WARN_ONCE(dev, r, "couldn't find PHY provider device resource\n"); -} -EXPORT_SYMBOL_GPL(devm_of_phy_provider_unregister); - /** * phy_release() - release the phy * @dev: the dev member within phy diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 03cd5bae92d3f189d739c453fe4c160dd2a5063e..06037a7eefc4b0319008065d142c9f1caba2c74d 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -288,8 +288,6 @@ struct phy_provider *__devm_of_phy_provider_register(struct device *dev, struct phy * (*of_xlate)(struct device *dev, const struct of_phandle_args *args)); void of_phy_provider_unregister(struct phy_provider *phy_provider); -void devm_of_phy_provider_unregister(struct device *dev, - struct phy_provider *phy_provider); int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id); void phy_remove_lookup(struct phy *phy, const char *con_id, const char *dev_id); #else @@ -547,10 +545,6 @@ static inline void of_phy_provider_unregister(struct phy_provider *phy_provider) { } -static inline void devm_of_phy_provider_unregister(struct device *dev, - struct phy_provider *phy_provider) -{ -} static inline int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id) { From patchwork Mon Feb 10 13:32:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 13967958 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 57329C0219D for ; Mon, 10 Feb 2025 13:45:21 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ca4UFz03H1d+Xc5goO0ec/4MyRYdwWIgIKW+jCp7tS4=; b=PveZ2vBJQzfR2r 2h6PCyTCnFJe3uIBy1sjD4VNLNyMk7rFEt/+/EuGfn4/q1D+Q4gW+kElQ7wskWWREo3P3taq8n+cZ hNhzSlUoav5COWT++X2pupS7PY7EX7g39semjX8qgi+5BW53OxdPgMVUDSdT6RmMRWiTRaRHHdYjo N/v2TonU5teDqpERbqKUYAVrb3GpQ7PPwFPCOefsqC4x55VnMN0X2KE8iHYMSvnLMLV1lPmeMoGje Mico2HAaiNXe/5bz7PHys+4U4AuFZ5jroWrl1GiCKHWJPVk65OTR7DCm34LzQOsyvzYczwwD2KH06 vgoBmYj5WhT6CINRMrNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1thU6D-000000000sT-0Jn4; Mon, 10 Feb 2025 13:45:21 +0000 Received: from mr85p00im-ztdg06011201.me.com ([17.58.23.181]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1thTtu-0000000HZ0j-2uqn for linux-phy@lists.infradead.org; Mon, 10 Feb 2025 13:32:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; bh=tfkcqBi0ou5N+iPlIoNtZJvvEZ4xTbBbnOJsMG5xchk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:x-icloud-hme; b=RN42a6ZMjslZjkVYfWXKILcfiyrKlYgS2WNzV+wR8w1UgukG/CbJ/gtXdZvplUD1b uWWx/FH6x8aORC9gzdBdiq4saxtIFWxCNAZS+RCraFc3kn0/BFhrN8dNTIQVzPdPcm gY/jxQNBNOKq26cMPMR5KQshejjEUCIUtJH3NIb6O4Kmswqu36SRlvp/JRASJrAcCs UXOBZ5BBvrB81YOYwRXT7kzU9ytBplMb4xy3tlSWsgdyt7tfOByOJ7yihCnRbvItW5 ElW5Rg4hIyRUTCCJ+P0dXivXvLh06ThhXTrt2MlS0GoGJ0DxAuRMdJy2bOMZd5UVtL 9m1JKDcXsXG4A== Received: from [192.168.1.26] (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-ztdg06011201.me.com (Postfix) with ESMTPSA id 4CBE896018B; Mon, 10 Feb 2025 13:32:33 +0000 (UTC) From: Zijun Hu Date: Mon, 10 Feb 2025 21:32:03 +0800 Subject: [PATCH 2/2] phy: core: Remove API devm_phy_destroy() MIME-Version: 1.0 Message-Id: <20250210-remove-apis-v1-2-2aaa866315a7@quicinc.com> References: <20250210-remove-apis-v1-0-2aaa866315a7@quicinc.com> In-Reply-To: <20250210-remove-apis-v1-0-2aaa866315a7@quicinc.com> To: Jonathan Corbet , Alex Shi , Yanteng Si , Vinod Koul , Kishon Vijay Abraham I Cc: Zijun Hu , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Zijun Hu X-Mailer: b4 0.14.2 X-Proofpoint-ORIG-GUID: RZ9wNBzzm8BlNtPvaML8Qa5-SHehXFEi X-Proofpoint-GUID: RZ9wNBzzm8BlNtPvaML8Qa5-SHehXFEi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-10_07,2025-02-10_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 clxscore=1015 mlxscore=0 spamscore=0 bulkscore=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2502100113 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250210_053238_760195_A06AAC35 X-CRM114-Status: GOOD ( 10.63 ) 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 From: Zijun Hu API devm_phy_destroy() has not had callers since 2013-09-27 when it was introduced. Remove the API. Signed-off-by: Zijun Hu --- Documentation/driver-api/phy/phy.rst | 6 ++---- Documentation/translations/zh_CN/driver-api/phy/phy.rst | 7 ++----- drivers/phy/phy-core.c | 17 ----------------- include/linux/phy/phy.h | 5 ----- 4 files changed, 4 insertions(+), 31 deletions(-) diff --git a/Documentation/driver-api/phy/phy.rst b/Documentation/driver-api/phy/phy.rst index be3687a2a11bbf84e6e5561b11931ea6db984434..cae03d8a4812b3c4cfca64272cc6b8f83a81d1c8 100644 --- a/Documentation/driver-api/phy/phy.rst +++ b/Documentation/driver-api/phy/phy.rst @@ -173,13 +173,11 @@ Destroying the PHY ================== When the driver that created the PHY is unloaded, it should destroy the PHY it -created using one of the following 2 APIs:: +created using the following API:: void phy_destroy(struct phy *phy); - void devm_phy_destroy(struct device *dev, struct phy *phy); -Both these APIs destroy the PHY and devm_phy_destroy destroys the devres -associated with this PHY. +The API destroys the PHY. PM Runtime ========== diff --git a/Documentation/translations/zh_CN/driver-api/phy/phy.rst b/Documentation/translations/zh_CN/driver-api/phy/phy.rst index 2d3f98deb92035c44fcb1ff0e3dc8543053140f6..37c23fcebf11f397d0dc502bbba11a74c525f085 100644 --- a/Documentation/translations/zh_CN/driver-api/phy/phy.rst +++ b/Documentation/translations/zh_CN/driver-api/phy/phy.rst @@ -164,14 +164,11 @@ PHY 关联的设备资源。 销毁 PHY ======== -当创建 PHY 的驱动程序被卸载时,它应该使用以下 2 个 API 之一销毁其创 -建的 PHY:: +当创建 PHY 的驱动程序被卸载时,它应该使用以下 API 销毁其创建的 PHY:: void phy_destroy(struct phy *phy); - void devm_phy_destroy(struct device *dev, struct phy *phy); -这两个 API 都会销毁 PHY,并且 devm_phy_destroy 会销毁与此 PHY 关 -联的 devres。 +这个 API 会销毁 PHY。 PM Runtime ========== diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index dd6302dfd14d2ec060857fc019268096c33e37a2..8e0e11553e369e06f5ee4cdbb111b4ddb1b34e74 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -1107,23 +1107,6 @@ void phy_destroy(struct phy *phy) } EXPORT_SYMBOL_GPL(phy_destroy); -/** - * devm_phy_destroy() - destroy the PHY - * @dev: device that wants to release this phy - * @phy: the phy returned by devm_phy_get() - * - * destroys the devres associated with this phy and invokes phy_destroy - * to destroy the phy. - */ -void devm_phy_destroy(struct device *dev, struct phy *phy) -{ - int r; - - r = devres_release(dev, devm_phy_consume, devm_phy_match, phy); - dev_WARN_ONCE(dev, r, "couldn't find PHY resource\n"); -} -EXPORT_SYMBOL_GPL(devm_phy_destroy); - /** * __of_phy_provider_register() - create/register phy provider with the framework * @dev: struct device of the phy provider diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 06037a7eefc4b0319008065d142c9f1caba2c74d..66eb664249ddaa6635bf80d8db115cb21473ceb8 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -278,7 +278,6 @@ struct phy *phy_create(struct device *dev, struct device_node *node, struct phy *devm_phy_create(struct device *dev, struct device_node *node, const struct phy_ops *ops); void phy_destroy(struct phy *phy); -void devm_phy_destroy(struct device *dev, struct phy *phy); struct phy_provider *__of_phy_provider_register(struct device *dev, struct device_node *children, struct module *owner, struct phy * (*of_xlate)(struct device *dev, @@ -521,10 +520,6 @@ static inline void phy_destroy(struct phy *phy) { } -static inline void devm_phy_destroy(struct device *dev, struct phy *phy) -{ -} - static inline struct phy_provider *__of_phy_provider_register( struct device *dev, struct device_node *children, struct module *owner, struct phy * (*of_xlate)(struct device *dev,