Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4777357pxk; Wed, 30 Sep 2020 11:22:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdrCGlZcb6hpy3Gr3qEU/cXEZ/UsIV9MCfH3pm80Nj7iIrPkWTg8I2V34GWZxccuOV0OkG X-Received: by 2002:a17:906:5490:: with SMTP id r16mr4010034ejo.222.1601490179607; Wed, 30 Sep 2020 11:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601490179; cv=none; d=google.com; s=arc-20160816; b=q9IuBOOWBmzbozr9FEEOFXh9NTjUbucY1SfcTaqeVeUN5uFrlfa0fyprLownAdozLq OsRYfoPQxrWQ37UgxDUS4Pdp/j/+p/aSc1u1faR/aCH39YlXSDdi97mrB0u34fvyfCi5 8hJIJi77IIiAAxuyTklHbzw1a+0FMC/ACqYM/I5inTcqfa3xJNXqZEhJ1rt91LcMTsCp I38Xw+SKYRrocO9NY183vg1uaum0srjV/3Ch0oPZGg0VaoVlzzqkewRiOurKAh5itCu1 ZYSNZJh8pySOrgaBi4a0UrtvJqrHj5gaJhz/xcaVe3Z+kEJ2FXi8mHzRIgMmSJJVtKqS aaCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=lP69cswRvsCGpfrlUglaVkf3A0VeRup9ZAQTBAJaC70=; b=FAXg0NU6b4oX+C7DWUWvlxap9CzIYpyOwQgVXMziGRKs7uf1aCo4iO6X0xgsljIhK7 JZnLX06Eir5KPuRILb/k34CWlt+T8XVYr0pc5fHtRaQ7k1wSLiwQqpiM6OFzJI7eSAvi Zd6FBn5Kswqq5EUiZB0umdGMAIxtx40qvvrn93vwQGYWRHuLViRvMHrMd8jr91b0uJ0K JP7SoYh4KpJ0MtGndKdvkA+uHSOrZorcNVQYm0m+oL04sLubcwXcX1UzlxJeO6WszA0X 6ECeAwUxMmpIlT5mfSwq+3C5N4X6uz/pEOMZ8fHxsxgTFXF/tNKyBwqbVvmdXpJtQ+hB dChw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si1638936edn.218.2020.09.30.11.22.36; Wed, 30 Sep 2020 11:22:59 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729322AbgI3STO (ORCPT + 99 others); Wed, 30 Sep 2020 14:19:14 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:36558 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725355AbgI3STN (ORCPT ); Wed, 30 Sep 2020 14:19:13 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kNggw-00GwPE-U1; Wed, 30 Sep 2020 20:19:02 +0200 Date: Wed, 30 Sep 2020 20:19:02 +0200 From: Andrew Lunn To: Russell King - ARM Linux admin 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: <20200930181902.GT3996795@lunn.ch> References: <20200930160430.7908-1-calvin.johnson@oss.nxp.com> <20200930160430.7908-4-calvin.johnson@oss.nxp.com> <20200930163440.GR3996795@lunn.ch> <20200930180725.GE1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200930180725.GE1551@shell.armlinux.org.uk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 30, 2020 at 07:07:25PM +0100, Russell King - ARM Linux admin wrote: > 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. Ah. A comment would be good here. Andrew