of: extra: Introduce ofnode_phy_is_fixed_link() API
authorBin Meng <bmeng.cn@gmail.com>
Sun, 14 Mar 2021 12:14:46 +0000 (20:14 +0800)
committerPriyanka Jain <priyanka.jain@nxp.com>
Mon, 26 Apr 2021 06:48:35 +0000 (12:18 +0530)
commitcb0d348d5c53b4abc40dc623077e95789efece20
tree6302d59b58e9a62311ce15917e8f8c8df7a97c7f
parentbfb5feada4093608bb431112e9012b855a81aafa
of: extra: Introduce ofnode_phy_is_fixed_link() API

Introduce a helper API ofnode_phy_is_fixed_link() to detect whether
the ethernet controller connects to a fixed-link pseudo-PHY device.

Note there are two ways to describe a fixed PHY attached to an
Ethernet device:

- the new DT binding, where 'fixed-link' is a sub-node of the
  Ethernet device
- the old DT binding, where 'fixed-link' is a property with 5
  cells encoding various information about the fixed PHY

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
drivers/core/of_extra.c
include/dm/of_extra.h