Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8a2fe56e authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller
Browse files

net: phy: re-design phy_modes to be self-contained



of_get_phy_mode() uses a local array to map phy_interface_t values from
include/linux/net/phy.h to a string which is read from the 'phy-mode' or
'phy-connection-type' property. In preparation for exposing the PHY
interface mode through sysfs, perform the following:

- mode phy_modes from drivers/of/of_net.c to include/linux/phy.h such
  that it is right below the phy_interface_t enum
- make it a static inline function returning the string such that we can
  use it by just including include/linux/net/phy.h
- add a PHY_INTERFACE_MODE_MAX enum value to guard the iteration in
  of_get_phy_mode()

Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ad033506
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment