lkml.org 
[lkml]   [2021]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2021-02-08 19:37    [W:0.175 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site