Messages in this thread |  | | From | Andy Shevchenko <> | Date | Mon, 8 Feb 2021 18:21:22 +0200 | Subject | Re: [net-next PATCH v5 15/15] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver |
| |
On Mon, Feb 8, 2021 at 5:15 PM Calvin Johnson <calvin.johnson@oss.nxp.com> wrote: > > Modify dpaa2_mac_connect() to support ACPI along with DT. > Modify dpaa2_mac_get_node() to get the dpmac fwnode from either > DT or ACPI. > > Replace of_get_phy_mode with fwnode_get_phy_mode to get > phy-mode for a dpmac_node. > > Use helper function phylink_fwnode_phy_connect() to find phy_dev and > connect to mac->phylink.
...
> + if (is_of_node(dev->parent->fwnode)) { > + dpmacs = of_find_node_by_name(NULL, "dpmacs"); > + if (!dpmacs) > + return NULL; > + parent = of_fwnode_handle(dpmacs); > + } else if (is_acpi_node(dev->parent->fwnode)) {
> + parent = dev->parent->fwnode;
dev_fwnode(dev->parent) ?
> + }
...
> + if (err) { > continue;
> + } else if (id == dpmac_id) {
Useless 'else'
> + if (is_of_node(dev->parent->fwnode))
dev_fwnode() ?
> + of_node_put(dpmacs); > + return child; > + }
...
> + if (is_of_node(dev->parent->fwnode))
Ditto ?
> + of_node_put(dpmacs);
-- With Best Regards, Andy Shevchenko
|  |