linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Calvin Johnson <calvin.johnson@oss.nxp.com>
Cc: Cristi Sovaiala <cristian.sovaiala@nxp.com>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Ioana Radulescu <ruxandra.radulescu@nxp.com>,
	"Rajesh V . Bikkina" <rajesh.bikkina@nxp.com>,
	Pankaj Bansal <pankaj.bansal@nxp.com>,
	Russell King - ARM Linux admin <linux@armlinux.org.uk>,
	Diana Madalina Craciun <diana.craciun@nxp.com>,
	linux-acpi@vger.kernel.org,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Florin Laurentiu Chiculita <florinlaurentiu.chiculita@nxp.com>,
	Madalin Bucur <madalin.bucur@oss.nxp.com>,
	Makarand Pawagi <makarand.pawagi@nxp.com>,
	Varun Sethi <V.Sethi@nxp.com>, Marcin Wojtas <mw@semihalf.com>,
	linux-arm-kernel@lists.infradead.org,
	Laurentiu Tudor <laurentiu.tudor@nxp.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jeremy Linton <jeremy.linton@arm.com>,
	linux.cj@gmail.com, "David S. Miller" <davem@davemloft.net>
Subject: Re: [RFC net-next PATCH v2 2/2] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver
Date: Sat, 18 Apr 2020 17:00:29 +0200	[thread overview]
Message-ID: <20200418150029.GH804711@lunn.ch> (raw)
In-Reply-To: <20200418105432.11233-3-calvin.johnson@oss.nxp.com>

> -	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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2020-04-18 15:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-18 10:54 [RFC net-next PATCH v2 0/2] ACPI support for xgmac_mdio and dpaa2-mac drivers Calvin Johnson
2020-04-18 10:54 ` [RFC net-next PATCH v2 1/2] net/fsl: add ACPI support for mdio bus Calvin Johnson
2020-04-18 11:41   ` Russell King - ARM Linux admin
2020-04-18 11:50     ` Andy Shevchenko
2020-04-18 14:39     ` Andrew Lunn
2020-04-20 15:42     ` Calvin Johnson
2020-04-18 14:46   ` Andrew Lunn
2020-04-20 15:44     ` Calvin Johnson
2020-04-18 10:54 ` [RFC net-next PATCH v2 2/2] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver Calvin Johnson
2020-04-18 11:38   ` Russell King - ARM Linux admin
2020-04-20 13:53     ` Calvin Johnson
2020-04-18 15:00   ` Andrew Lunn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200418150029.GH804711@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=V.Sethi@nxp.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=calvin.johnson@oss.nxp.com \
    --cc=cristian.sovaiala@nxp.com \
    --cc=davem@davemloft.net \
    --cc=diana.craciun@nxp.com \
    --cc=f.fainelli@gmail.com \
    --cc=florinlaurentiu.chiculita@nxp.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=jeremy.linton@arm.com \
    --cc=laurentiu.tudor@nxp.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux.cj@gmail.com \
    --cc=linux@armlinux.org.uk \
    --cc=madalin.bucur@oss.nxp.com \
    --cc=makarand.pawagi@nxp.com \
    --cc=mw@semihalf.com \
    --cc=netdev@vger.kernel.org \
    --cc=pankaj.bansal@nxp.com \
    --cc=rajesh.bikkina@nxp.com \
    --cc=ruxandra.radulescu@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).