Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1766564ybz; Sat, 18 Apr 2020 08:03:55 -0700 (PDT) X-Google-Smtp-Source: APiQypII6cbtKuyHM2036PPqBU4UGR4GafayCLuudtGg67xLty23grUWsqRei0gluXv//EofAyiH X-Received: by 2002:a50:bc16:: with SMTP id j22mr7680130edh.257.1587222235068; Sat, 18 Apr 2020 08:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587222235; cv=none; d=google.com; s=arc-20160816; b=Y4gbgT2fDaxDerFCVchFESocB0QYqIUijT2ZUtN5HPCSY/KpNZUEUuroi8VULvffgX eHxnor1e81fPR4Wb09JHQoqrBjTT4b4XjSjy0Z2SQSC+SBksx3KN88VEZRPSPa0JCk5J vTHc+T0gaYahhou9sX/3oBfbEDmFz7GqoFABnmCbiLOQaAnMftQTQ1JTbDO7il2MmfYW hMlWiJtUqkH/PBtAkZc9LhoZeJUbyRYMh1jv3JthlxwCKO1fr12XOzJrc4g63IOd3Zi4 /V/Z+HpwI0Z9bG27wZgXlVenvVnnY3PaxAN124sBptMpjkINW3uC16RV2HQRDJte95HO EL6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=3k2dnf2InJf5CY0m1dDSEfIyndBrROF/WgHcjwyBxz4=; b=HBWRk9AGya9SxBdAdSHbaDWNWDJRPU7cMZ41NNcKG6W4xZ7v9C7npzmD3n7deahiAs qVJUh7mSCUGM2n50ljNQ4bzyfzyfz8zng9T0f2NAKzoprbXmIzetRdJoDgDoKu3QDhEP oKBRV7jqWLaJvihHfBZhdXbkTsUgbkaj56u0a53Cf2QFY42SU54o/LA+zRKJe9xNJlrv benUhzROczoa98igYeGPXpFRVhh+IgW1GHVUEhxy9fa5DW0xKlsk78LPC2yeJcGLgSaY PpsHzNcTuwzIknCTj6sImhrk1MEDS6EknlGkVKzCTR0pblnrw5yKAJDZMjTrl/DnNCop cK+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=KZEI8tMM; 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 ck10si5129077ejb.431.2020.04.18.08.03.32; Sat, 18 Apr 2020 08:03:55 -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 header.i=@lunn.ch header.s=20171124 header.b=KZEI8tMM; 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 S1726505AbgDRPAg (ORCPT + 99 others); Sat, 18 Apr 2020 11:00:36 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:46608 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725903AbgDRPAf (ORCPT ); Sat, 18 Apr 2020 11:00:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender: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=3k2dnf2InJf5CY0m1dDSEfIyndBrROF/WgHcjwyBxz4=; b=KZEI8tMMhflTCK9sm+aYt1BQh5 r0QGwzESr7kJXvksintdRLT/3sVUATQbUgfHf//Cv4Cf24va5mHEZd+9Unk7p33MfBJzdChpPBqwI ZzvR2BzA0fosErF5fON5HkgcP9thFH1bSG/lL3sbiM3NhEgkqJF1bTUWe24BwDKqlkoQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1jPoxJ-003TWR-36; Sat, 18 Apr 2020 17:00:29 +0200 Date: Sat, 18 Apr 2020 17:00:29 +0200 From: Andrew Lunn To: Calvin Johnson Cc: linux.cj@gmail.com, Jeremy Linton , Andy Shevchenko , Florian Fainelli , Russell King - ARM Linux admin , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , netdev@vger.kernel.org, Laurentiu Tudor , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Diana Madalina Craciun , linux-kernel@vger.kernel.org, Varun Sethi , Marcin Wojtas , "Rajesh V . Bikkina" , Pankaj Bansal , Makarand Pawagi , "David S. Miller" , Ioana Radulescu Subject: Re: [RFC net-next PATCH v2 2/2] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver Message-ID: <20200418150029.GH804711@lunn.ch> References: <20200418105432.11233-1-calvin.johnson@oss.nxp.com> <20200418105432.11233-3-calvin.johnson@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200418105432.11233-3-calvin.johnson@oss.nxp.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > - err = phylink_of_phy_connect(mac->phylink, dpmac_node, 0); > + if (is_of_node(dpmac_node)) > + err = phylink_of_phy_connect(mac->phylink, > + to_of_node(dpmac_node), 0); > + else if (is_acpi_node(dpmac_node)) { > + status = acpi_node_get_property_reference(dpmac_node, > + "phy-handle", > + 0, &args); > + if (ACPI_FAILURE(status)) > + goto err_phylink_destroy; > + phy_dev = fwnode_phy_find_device(args.fwnode); > + if (!phy_dev) > + goto err_phylink_destroy; > + > + err = phylink_connect_phy(mac->phylink, phy_dev); > + if (err) > + phy_detach(phy_dev); So it looks like you need to add a phylink_fwnode_phy_connect(). And maybe on top of that you need a phylink_device_phy_connect()? So please stop. Take a step back, look at how the of_, device_, fwnode_, and acpi_ abstractions all stack on top of each other, then propose phylib and phylink core changes to implement these abstractions. Andrew