lkml.org 
[lkml]   [2020]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC net-next PATCH v2 2/2] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver
> -	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

\
 
 \ /
  Last update: 2020-04-18 17:00    [W:0.117 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site