aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSimon Horman <horms+renesas@verge.net.au>2015-09-30 15:15:52 +0900
committerDavid S. Miller <davem@davemloft.net>2015-10-03 05:05:18 -0700
commitf3a6bd393c2c5d0e6b16624ba99a1c5fa07bdb0b (patch)
treec20a13d85f4711f81cedfa1d52f99846b7d04645 /include
parentMerge branch 'bpf-updates' (diff)
downloadlinux-dev-f3a6bd393c2c5d0e6b16624ba99a1c5fa07bdb0b.tar.xz
linux-dev-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')
-rw-r--r--include/linux/phy.h1
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 *));