diff options
author | Simon Horman <horms+renesas@verge.net.au> | 2015-09-30 15:15:52 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-03 05:05:18 -0700 |
commit | f3a6bd393c2c5d0e6b16624ba99a1c5fa07bdb0b (patch) | |
tree | c20a13d85f4711f81cedfa1d52f99846b7d04645 /include/linux/phy.h | |
parent | f8e1100afc4f362e94c2d4a3231f16c77beb6d1b (diff) | |
download | blackbird-obmc-linux-f3a6bd393c2c5d0e6b16624ba99a1c5fa07bdb0b.tar.gz blackbird-obmc-linux-f3a6bd393c2c5d0e6b16624ba99a1c5fa07bdb0b.zip |
phylib: Add phy_set_max_speed helper
Add a helper to allow ethernet drivers to limit the speed of a phy
(that they are attached to).
This mainly involves factoring out the business-end of
of_set_phy_supported() and exporting a new symbol.
This code seems to be open coded in several places, in several different
variants.
It is is envisaged that this will be used in situations where setting the
"max-speed" property in DT is not appropriate, e.g. because the maximum
speed is not a property of the phy hardware.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r-- | include/linux/phy.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 4a4e3a092337..4c477e6ece33 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -798,6 +798,7 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd); int phy_start_interrupts(struct phy_device *phydev); void phy_print_status(struct phy_device *phydev); void phy_device_free(struct phy_device *phydev); +int phy_set_max_speed(struct phy_device *phydev, u32 max_speed); int phy_register_fixup(const char *bus_id, u32 phy_uid, u32 phy_uid_mask, int (*run)(struct phy_device *)); |