]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita23369ab458d8dcaa261f9e607cdea26f665e372
treec20a13d85f4711f81cedfa1d52f99846b7d04645
parent876b5b98db9f5194b202e14fefebe6fbe59fe60d
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