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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 845DDC4727C for ; Wed, 30 Sep 2020 18:09:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1BDA02076A for ; Wed, 30 Sep 2020 18:09:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="yPyHqK4A"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="iuAGM7wL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BDA02076A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CrjLtklEm80PyHiT6mp4BL3wXhHbtHPhno54pFkA9e8=; b=yPyHqK4AzFKGkFj1lOU4DTsvt Pjz9dgU3f+xypnQraXEj6hthCYSBNMya3ALDt1rcAJAflZgfOTICBBnNH7vVc7AX+zoCGnVj+alvy j9+VPhg3r3W6u/iDWqPu3FtGNFdnK9cIKZ77dkF+OTRKMPR6ExobmxQxMvHqwuSZq8HBH3Xk//cQd UWAn8wFk/nMruqgFmtpPppYEm7oYiwvgk/dsLrVsUfWdMPtMeKCVhxfN4Ncv4bKub3GFFfEjDNVOt Ddlldqah1yINOt2tMQWGWvGjKd/hYjAE/1yPy4s2bEoLZvu/V5BValzazis+4gbpnrnSD5oBVzt5s HkpS73fNg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNgW1-0000mc-A3; Wed, 30 Sep 2020 18:07:45 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNgVy-0000mJ-Po for linux-arm-kernel@lists.infradead.org; Wed, 30 Sep 2020 18:07:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uShV4aZV0sOQPScv6kvv8M8xF1Pqa9FFraKmruEA5YI=; b=iuAGM7wLs0u/JhRHhU5OKESMA CpeXu6cKMr6bL+xEi0wXMyPVsxuAm7eYj3NHm/sGf/NbCZMISdL6CiqrD+TdfHELb/9O0UMgN7FhZ OrYYSH+gp34wOpIe+6K+mlgh8iHdfkOn6jUszoiGcviFrAJ+++FHJyBq4YxaGb2ODo/Xe9pertYSN /ftJcKPgk6g+QfQC633HHznr5sP3AZcFYlLkUQWLKH0LDRPprUTydKjDt/HL6hPfQrxg7MXYvnU+B uiWJqoK2UWR69NbwH5h6UsjvX5HosXE59NiwMQ7OrQJVvDbXWb9vyXjgAi0acdVYsnPyzSTU3RpYv beMTQbYgw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:40280) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNgVn-0002zh-7O; Wed, 30 Sep 2020 19:07:31 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1kNgVh-0002Kj-KP; Wed, 30 Sep 2020 19:07:25 +0100 Date: Wed, 30 Sep 2020 19:07:25 +0100 From: Russell King - ARM Linux admin To: Andrew Lunn Subject: Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id() Message-ID: <20200930180725.GE1551@shell.armlinux.org.uk> References: <20200930160430.7908-1-calvin.johnson@oss.nxp.com> <20200930160430.7908-4-calvin.johnson@oss.nxp.com> <20200930163440.GR3996795@lunn.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200930163440.GR3996795@lunn.ch> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200930_140742_875822_F1E2E302 X-CRM114-Status: GOOD ( 14.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , "Rafael J . Wysocki" , Madalin Bucur , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jeremy Linton , Heiner Kallweit , Diana Madalina Craciun , linux-acpi@vger.kernel.org, Andy Shevchenko , Grant Likely , Calvin Johnson , linux.cj@gmail.com, Ioana Ciornei , Heikki Krogerus , Jakub Kicinski , Laurentiu Tudor , Cristi Sovaiala , "David S. Miller" , linux-arm-kernel@lists.infradead.org, Florin Laurentiu Chiculita 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 On Wed, Sep 30, 2020 at 06:34:40PM +0200, Andrew Lunn wrote: > > @@ -2866,7 +2888,15 @@ EXPORT_SYMBOL_GPL(device_phy_find_device); > > */ > > struct fwnode_handle *fwnode_get_phy_node(struct fwnode_handle *fwnode) > > { > > - return fwnode_find_reference(fwnode, "phy-handle", 0); > > + struct fwnode_handle *phy_node; > > + > > + phy_node = fwnode_find_reference(fwnode, "phy-handle", 0); > > + if (is_acpi_node(fwnode) || !IS_ERR(phy_node)) > > + return phy_node; > > + phy_node = fwnode_find_reference(fwnode, "phy", 0); > > + if (IS_ERR(phy_node)) > > + phy_node = fwnode_find_reference(fwnode, "phy-device", 0); > > + return phy_node; > > Why do you have three different ways to reference a PHY? Compatibility with the DT version - note that "phy" and "phy-device" are only used for non-ACPI fwnodes. This should allow us to convert drivers where necessary without fear of causing DT regressions. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel