Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4768938pxk; Wed, 30 Sep 2020 11:09:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWRSQL25Aq33T3SpqNDK/n8NSUPC7gsjAJmFgcueCth/CbaENxrV/jN12kHJXp7YL1BTZ2 X-Received: by 2002:aa7:c61a:: with SMTP id h26mr4021507edq.254.1601489383316; Wed, 30 Sep 2020 11:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601489383; cv=none; d=google.com; s=arc-20160816; b=ptEN1UcORgpX+X9kQhSwt1GK7g5q10vhyji0mZyDjJAVEijd44iIdafYv/hJ6yoUhK NyLUGWO3COjDKiJ9mDh9egO/DNzRG9Wvms5UNforyYUOhEieBSnogiVnv+GNcJdv6krT 5cUZwB0KUFWmMeNhiIrAxrVWYLWm2xEr3nOLZSsAmtJSyIiuljlI4XQMqA2e2gVgrqzR HL6Nu7WHM2nW5Vrh11ws0D6lSYMz/KBV9lhK+4Qz/O2pnYsPwXuTfQJLjYr4WTSxMhZo Vjy9sALobpf/USuwLV1Z3aSyd2p3ciS4Et2h8WP4zKMZFAr18ng7vTgH1GWx/FVvtZc1 ES7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uShV4aZV0sOQPScv6kvv8M8xF1Pqa9FFraKmruEA5YI=; b=Hx0ZwSOuJPrBqC/ucr2eMxC3dzP9WWLZ04dAAv2sLKdUMg/PWuejtC0Z6UnYlNqhHq RKLnJimfF+s9gYu+U7Oc1Z2RVH3PPj3TT31K/4M7LY68NlpulmDMgqjTdzWdafDjWpe7 QAx7I5ZQb7N1XfQjNhjwGs3KN17lzvlkjBeipp01LXvrhP0j73/5pckg3zLCuR7ILuKb ZuD5x3sHn4iqKMfDok7AoXHFf9fAYRukLFS9yUVaSt1aOrWWFoVNeKBWQ087xXHwDTPW CCP8rga+sXUhU0a28bADDafUmpk10dl+Lh3//84imKQzQX88qAkKbKeon6iolkf+J6RE 2Q/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=iuAGM7wL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b19si1537615edy.519.2020.09.30.11.09.20; Wed, 30 Sep 2020 11:09:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=iuAGM7wL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729372AbgI3SHw (ORCPT + 99 others); Wed, 30 Sep 2020 14:07:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbgI3SHw (ORCPT ); Wed, 30 Sep 2020 14:07:52 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59D87C061755; Wed, 30 Sep 2020 11:07:51 -0700 (PDT) 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 Cc: Calvin Johnson , Grant Likely , "Rafael J . Wysocki" , Jeremy Linton , Andy Shevchenko , Florian Fainelli , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Heikki Krogerus , linux-kernel@vger.kernel.org, linux.cj@gmail.com, netdev@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Diana Madalina Craciun , Laurentiu Tudor , "David S. Miller" , Heiner Kallweit , Jakub Kicinski 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200930163440.GR3996795@lunn.ch> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King - ARM Linux admin Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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!