of: add of_mdio_find_device() api
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 23 Sep 2020 15:41:22 +0000 (18:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Sep 2020 02:49:36 +0000 (19:49 -0700)
commitb5b6775d72e8662b5ea7f892bf06db4831e2c1aa
tree1a26295076806814769f12e895aa033a1964443b
parente7e95c900338904536f7f7af98d467118909e5eb
of: add of_mdio_find_device() api

Add a helper function which finds the mdio_device structure given a
device tree node. This is helpful for finding the PCS device based on a
DTS node but managing it as a mdio_device instead of a phy_device.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/of/of_mdio.c
include/linux/of_mdio.h