]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: genphy: Allow overwriting features
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 21 May 2014 13:29:44 +0000 (15:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 May 2014 19:43:02 +0000 (15:43 -0400)
commit7b16fa138e0b23726293e9467192e916484e2d7a
tree5ac5dadf274ad245349b5c49b6aa13fbb7a91e7b
parentbab2e02ce3f2afe3f028cc955b2b0171f18a8379
net: phy: genphy: Allow overwriting features

of_set_phy_supported allows overwiting hardware capabilities of
a phy with values from the devicetree. This does not work with
the genphy driver though because the genphys config_init function
will overwrite all values adjusted by of_set_phy_supported. Fix
this by initialising the genphy features in the phy_driver struct
and in config_init just limit the features to the ones the hardware
can actually support. The resulting features are a subset of the
devicetree specified features and the hardware features.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c