phylib: Add phy_set_max_speed helper
authorSimon Horman <horms+renesas@verge.net.au>
Wed, 30 Sep 2015 06:15:52 +0000 (15:15 +0900)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Oct 2015 12:05:18 +0000 (05:05 -0700)
commitf3a6bd393c2c5d0e6b16624ba99a1c5fa07bdb0b
treec20a13d85f4711f81cedfa1d52f99846b7d04645
parentf8e1100afc4f362e94c2d4a3231f16c77beb6d1b
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>
drivers/net/phy/phy_device.c
include/linux/phy.h