]> git.karo-electronics.de Git - karo-tx-linux.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)
commitc242a47238fa2a6a54af8a16e62b54e6e031d4bc
tree5ac5dadf274ad245349b5c49b6aa13fbb7a91e7b
parenta6cea535e0cb85ece0673ac10f9d81779225564f
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