Thread (31 messages) 31 messages, 4 authors, 2021-02-16

Re: [net-next PATCH v5 15/15] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

From: Andy Shevchenko <hidden>
Date: 2021-02-08 18:36:13
Also in: linux-acpi, lkml, netdev

On Mon, Feb 8, 2021 at 5:15 PM Calvin Johnson
[off-list ref] 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help