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=-4.5 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 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 B6E2FC4727C for ; Wed, 30 Sep 2020 18:20:35 +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 4054C20738 for ; Wed, 30 Sep 2020 18:20:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="1y3HIcUQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4054C20738 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch 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=jzPVjyBiXg3HsOdD9Pye+yHHcGu5lM5/bRTon2XkSgU=; b=1y3HIcUQljKzjwXuy0mRgmOPs LpAsqYpbQn7FWdUFRfPJ1SFJGoHcRr1FXHSDJO5eiZRhUi8qA8XXIiX/hUE3h4ykcrm2XsK2LElVd t71Fsnc2720UHSQsy0LDbsT/mZI4UlE+Ttr2Z8KWU435fID7gEu3e3o+EAQ92gD7ZVLm2rc8RHQZK rgAFNC8dT0JfhKnKQ4Z68wENmSt7yEUZJ2u7IUo/SabQxaLwJlVjasoleAAZR2/qY0ejwu9Hksglv pC6f1Pr7MA0NPWlzbl4D9HTBm2eBJE8QJnw9oYyvGhfP8exO6V3ELEQcXs6+wUkmdavRTztVS36fg 2MYLxEZBw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNgh9-0001g2-Ql; Wed, 30 Sep 2020 18:19:15 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNgh7-0001f0-Cc for linux-arm-kernel@lists.infradead.org; Wed, 30 Sep 2020 18:19:13 +0000 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 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-Disposition: inline In-Reply-To: <20200930180725.GE1551@shell.armlinux.org.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200930_141913_437979_D8B8CDD7 X-CRM114-Status: GOOD ( 15.15 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel