From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CE18C25B4E for ; Tue, 24 Jan 2023 18:43:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233975AbjAXSnN (ORCPT ); Tue, 24 Jan 2023 13:43:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234006AbjAXSnH (ORCPT ); Tue, 24 Jan 2023 13:43:07 -0500 X-Greylist: delayed 302 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 24 Jan 2023 10:43:01 PST Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5BB428874 for ; Tue, 24 Jan 2023 10:43:01 -0800 (PST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed50:2f4a:8573:c294:b2ce]) by xavier.telenet-ops.be with bizsmtp id CidZ2900656uRqi01idZDF; Tue, 24 Jan 2023 19:37:56 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1pKOAe-007HCL-GZ; Tue, 24 Jan 2023 19:37:33 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1pKOAm-002n0W-Uv; Tue, 24 Jan 2023 19:37:32 +0100 From: Geert Uytterhoeven To: Vinod Koul , Jonathan Corbet , Madalin Bucur , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Horatiu Vultur , UNGLinuxDriver@microchip.com, Thierry Reding , Lorenzo Pieralisi , Rob Herring , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Bjorn Helgaas , Jonathan Hunter , Kishon Vijay Abraham I , Alan Stern , Greg Kroah-Hartman , Krzysztof Kozlowski , Alim Akhtar , Siddharth Vadapalli , Russell King Cc: linux-phy@lists.infradead.org, linux-doc@vger.kernel.org, netdev@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH treewide v2 0/9] phy: Add devm_of_phy_optional_get() helper Date: Tue, 24 Jan 2023 19:37:19 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Hi Vinod et al, While there exist several optional_get() PHY helper functions, there is no optional variant of devm_of_phy_get(), leading to several drivers implementing this theirselves, sometimes in buggy ways. Hence this series, after two cleanup patches, introduces a devm_of_phy_optional_get() helper(), and converts existing users of devm_of_phy_get() where appropriate. Changes compared to v1[1]: - Incorporate "[PATCH v2 1/9] phy: Remove unused phy_optional_get()", as it touches the same documentation, - New patch "[PATCH v2 2/9] doc: phy: Document devm_of_phy_get()", - Print an error message in case of failure, as requested by RobH, - Update Documentation, - Clarify removed checks for -ENODEV and -ENOSYS, - Remove error printing in case of real failures from callers, - Rebase am65-cpsw change on top of commit 854617f52ab42418 ("net: ethernet: ti: am65-cpsw: Handle -EPROBE_DEFER for Serdes PHY") in net-next (next-20230123 and later), - Add Reviewed-by, Acked-by. Most of this series been compile-tested only, but the new helper itself has been tested with a new user[2]. Thanks for your comments! [1] "[PATCH treewide 0/7] phy: Add devm_of_phy_optional_get() helper" https://lore.kernel.org/r/cover.1674036164.git.geert+renesas@glider.be [2] "[PATCH 12/12] can: rcar_canfd: Add transceiver support" https://lore.kernel.org/r/e825b50a843ffe40e33f34e4d858c07c1b2ff259.1674499048.git.geert+renesas@glider.be Geert Uytterhoeven (9): phy: Remove unused phy_optional_get() doc: phy: Document devm_of_phy_get() phy: Add devm_of_phy_optional_get() helper net: fman: memac: Convert to devm_of_phy_optional_get() net: lan966x: Convert to devm_of_phy_optional_get() net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get() PCI: tegra: Convert to devm_of_phy_optional_get() usb: host: ehci-exynos: Convert to devm_of_phy_optional_get() usb: host: ohci-exynos: Convert to devm_of_phy_optional_get() Documentation/driver-api/phy/phy.rst | 24 +++++---- .../net/ethernet/freescale/fman/fman_memac.c | 9 ++-- .../ethernet/microchip/lan966x/lan966x_main.c | 5 +- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 ++- drivers/pci/controller/pci-tegra.c | 5 +- drivers/phy/phy-core.c | 51 +++++++++++-------- drivers/usb/host/ehci-exynos.c | 23 +++------ drivers/usb/host/ohci-exynos.c | 23 +++------ include/linux/phy/phy.h | 16 +++--- 9 files changed, 75 insertions(+), 89 deletions(-) -- 2.34.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds From mboxrd@z Thu Jan 1 00:00:00 1970 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 A197AC54E94 for ; Tue, 24 Jan 2023 19:47:33 +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=flmZXBl1MwjQ1ju08gLaS9N7zeLpCoqo07Hz3slFdsI=; b=mhrX0wsm3q6sjL KUlkTXBXBQvsVvbV8LAfLZsN4W7WX0kPgCYxti59K0uzaEsP226ncTA4tb0qJeBZWpBh41LVzeqWO DCFMQgNXRxNopHK/8yI/RtbAt6G0F2gaKie+MyLI53L5s8MPxVisxEVfwk0tuRMuQTkn4T2yI0gCq M2Uif8oC+A3Na63CASV9SyilVq74eKSDLm1bsgSpynlxW6DXq+F3IT0NhD0WT6PBlA9AlMvDy5si4 XiTJDh9f8B0t6jR1NPrStbGCzJkydlKwhhEjlfp1qDmEanbSdz3QwmeByQaH0vk1qpGRDesZChyg0 l3FTbMa2ag+gaZdVwIrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKPFs-00549u-OA; Tue, 24 Jan 2023 19:46:52 +0000 Received: from xavier.telenet-ops.be ([2a02:1800:120:4::f00:14]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKOBF-004xjS-AG for linux-arm-kernel@lists.infradead.org; Tue, 24 Jan 2023 18:38:07 +0000 Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed50:2f4a:8573:c294:b2ce]) by xavier.telenet-ops.be with bizsmtp id CidZ2900656uRqi01idZDF; Tue, 24 Jan 2023 19:37:56 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1pKOAe-007HCL-GZ; Tue, 24 Jan 2023 19:37:33 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1pKOAm-002n0W-Uv; Tue, 24 Jan 2023 19:37:32 +0100 From: Geert Uytterhoeven To: Vinod Koul , Jonathan Corbet , Madalin Bucur , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Horatiu Vultur , UNGLinuxDriver@microchip.com, Thierry Reding , Lorenzo Pieralisi , Rob Herring , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Bjorn Helgaas , Jonathan Hunter , Kishon Vijay Abraham I , Alan Stern , Greg Kroah-Hartman , Krzysztof Kozlowski , Alim Akhtar , Siddharth Vadapalli , Russell King Cc: linux-phy@lists.infradead.org, linux-doc@vger.kernel.org, netdev@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH treewide v2 0/9] phy: Add devm_of_phy_optional_get() helper Date: Tue, 24 Jan 2023 19:37:19 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230124_103801_551019_64E6C7EB X-CRM114-Status: GOOD ( 18.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Vinod et al, While there exist several optional_get() PHY helper functions, there is no optional variant of devm_of_phy_get(), leading to several drivers implementing this theirselves, sometimes in buggy ways. Hence this series, after two cleanup patches, introduces a devm_of_phy_optional_get() helper(), and converts existing users of devm_of_phy_get() where appropriate. Changes compared to v1[1]: - Incorporate "[PATCH v2 1/9] phy: Remove unused phy_optional_get()", as it touches the same documentation, - New patch "[PATCH v2 2/9] doc: phy: Document devm_of_phy_get()", - Print an error message in case of failure, as requested by RobH, - Update Documentation, - Clarify removed checks for -ENODEV and -ENOSYS, - Remove error printing in case of real failures from callers, - Rebase am65-cpsw change on top of commit 854617f52ab42418 ("net: ethernet: ti: am65-cpsw: Handle -EPROBE_DEFER for Serdes PHY") in net-next (next-20230123 and later), - Add Reviewed-by, Acked-by. Most of this series been compile-tested only, but the new helper itself has been tested with a new user[2]. Thanks for your comments! [1] "[PATCH treewide 0/7] phy: Add devm_of_phy_optional_get() helper" https://lore.kernel.org/r/cover.1674036164.git.geert+renesas@glider.be [2] "[PATCH 12/12] can: rcar_canfd: Add transceiver support" https://lore.kernel.org/r/e825b50a843ffe40e33f34e4d858c07c1b2ff259.1674499048.git.geert+renesas@glider.be Geert Uytterhoeven (9): phy: Remove unused phy_optional_get() doc: phy: Document devm_of_phy_get() phy: Add devm_of_phy_optional_get() helper net: fman: memac: Convert to devm_of_phy_optional_get() net: lan966x: Convert to devm_of_phy_optional_get() net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get() PCI: tegra: Convert to devm_of_phy_optional_get() usb: host: ehci-exynos: Convert to devm_of_phy_optional_get() usb: host: ohci-exynos: Convert to devm_of_phy_optional_get() Documentation/driver-api/phy/phy.rst | 24 +++++---- .../net/ethernet/freescale/fman/fman_memac.c | 9 ++-- .../ethernet/microchip/lan966x/lan966x_main.c | 5 +- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 ++- drivers/pci/controller/pci-tegra.c | 5 +- drivers/phy/phy-core.c | 51 +++++++++++-------- drivers/usb/host/ehci-exynos.c | 23 +++------ drivers/usb/host/ohci-exynos.c | 23 +++------ include/linux/phy/phy.h | 16 +++--- 9 files changed, 75 insertions(+), 89 deletions(-) -- 2.34.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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 9C560C25B50 for ; Tue, 24 Jan 2023 19:47:35 +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=lx0RJ2oTyU4BPj0nSArkjqK+TLuf7hquPjYaKuV4Vw8=; b=h6u68OYnGZhOSY P1vUVOGnHRi0xjrzrPhXlNmD5iSKVUsDbik8fXUB1Tu7UosQSzIdT2ADeDLoqJ+xpc9hyZHLqvu6i i8mCJ1hJI1WpgR9x9ruICvrWqpCmzoL7cRQoCve7P4mjYd/3YlTmEjACFN39QUGhDPfNFATrrsy83 dFF//XQ8qyv+3Ie3RBWmFXsTDXbgp7rWp3AVcykVJDyLeQZCIxX62w7kL1qjfQ6I/8Qnq9tH0/jdY SnuGokEDpiMCKPR8JswrHoNzqIHAFhWb8TpYjB/gzgIwjes5tRU/f7DVG+X8N8khIhgGVutPZNGoz IWq9iTjxD6iV7s5zgKPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKPGY-0054aU-S9; Tue, 24 Jan 2023 19:47:34 +0000 Received: from xavier.telenet-ops.be ([2a02:1800:120:4::f00:14]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKOBF-004xjR-AF for linux-phy@lists.infradead.org; Tue, 24 Jan 2023 18:38:08 +0000 Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed50:2f4a:8573:c294:b2ce]) by xavier.telenet-ops.be with bizsmtp id CidZ2900656uRqi01idZDF; Tue, 24 Jan 2023 19:37:56 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1pKOAe-007HCL-GZ; Tue, 24 Jan 2023 19:37:33 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1pKOAm-002n0W-Uv; Tue, 24 Jan 2023 19:37:32 +0100 From: Geert Uytterhoeven To: Vinod Koul , Jonathan Corbet , Madalin Bucur , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Horatiu Vultur , UNGLinuxDriver@microchip.com, Thierry Reding , Lorenzo Pieralisi , Rob Herring , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Bjorn Helgaas , Jonathan Hunter , Kishon Vijay Abraham I , Alan Stern , Greg Kroah-Hartman , Krzysztof Kozlowski , Alim Akhtar , Siddharth Vadapalli , Russell King Cc: linux-phy@lists.infradead.org, linux-doc@vger.kernel.org, netdev@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH treewide v2 0/9] phy: Add devm_of_phy_optional_get() helper Date: Tue, 24 Jan 2023 19:37:19 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230124_103801_570751_8ACACE4F X-CRM114-Status: GOOD ( 17.48 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Hi Vinod et al, While there exist several optional_get() PHY helper functions, there is no optional variant of devm_of_phy_get(), leading to several drivers implementing this theirselves, sometimes in buggy ways. Hence this series, after two cleanup patches, introduces a devm_of_phy_optional_get() helper(), and converts existing users of devm_of_phy_get() where appropriate. Changes compared to v1[1]: - Incorporate "[PATCH v2 1/9] phy: Remove unused phy_optional_get()", as it touches the same documentation, - New patch "[PATCH v2 2/9] doc: phy: Document devm_of_phy_get()", - Print an error message in case of failure, as requested by RobH, - Update Documentation, - Clarify removed checks for -ENODEV and -ENOSYS, - Remove error printing in case of real failures from callers, - Rebase am65-cpsw change on top of commit 854617f52ab42418 ("net: ethernet: ti: am65-cpsw: Handle -EPROBE_DEFER for Serdes PHY") in net-next (next-20230123 and later), - Add Reviewed-by, Acked-by. Most of this series been compile-tested only, but the new helper itself has been tested with a new user[2]. Thanks for your comments! [1] "[PATCH treewide 0/7] phy: Add devm_of_phy_optional_get() helper" https://lore.kernel.org/r/cover.1674036164.git.geert+renesas@glider.be [2] "[PATCH 12/12] can: rcar_canfd: Add transceiver support" https://lore.kernel.org/r/e825b50a843ffe40e33f34e4d858c07c1b2ff259.1674499048.git.geert+renesas@glider.be Geert Uytterhoeven (9): phy: Remove unused phy_optional_get() doc: phy: Document devm_of_phy_get() phy: Add devm_of_phy_optional_get() helper net: fman: memac: Convert to devm_of_phy_optional_get() net: lan966x: Convert to devm_of_phy_optional_get() net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get() PCI: tegra: Convert to devm_of_phy_optional_get() usb: host: ehci-exynos: Convert to devm_of_phy_optional_get() usb: host: ohci-exynos: Convert to devm_of_phy_optional_get() Documentation/driver-api/phy/phy.rst | 24 +++++---- .../net/ethernet/freescale/fman/fman_memac.c | 9 ++-- .../ethernet/microchip/lan966x/lan966x_main.c | 5 +- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 ++- drivers/pci/controller/pci-tegra.c | 5 +- drivers/phy/phy-core.c | 51 +++++++++++-------- drivers/usb/host/ehci-exynos.c | 23 +++------ drivers/usb/host/ohci-exynos.c | 23 +++------ include/linux/phy/phy.h | 16 +++--- 9 files changed, 75 insertions(+), 89 deletions(-) -- 2.34.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy