diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-02-12 02:27:42 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-13 01:08:49 +0100 |
commit | 8bed1285b98e6a90403cdfe0500e8ad6bd8e8f1c (patch) | |
tree | 05000e0153853964af653ad5ed566a669a9a8681 /drivers/net/phy/mdio_bus.c | |
parent | net: phy: add "has_fixups" boolean property (diff) | |
download | linux-8bed1285b98e6a90403cdfe0500e8ad6bd8e8f1c.tar.xz linux-8bed1285b98e6a90403cdfe0500e8ad6bd8e8f1c.zip |
net: phy: expose phydev->has_fixups to sysfs
Expose the PHY device has_fixups boolean as a sysfs property to help
troubleshooting PHY configurations.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 7c66ea095a46..76f54b32a120 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -441,9 +441,19 @@ phy_interface_show(struct device *dev, struct device_attribute *attr, char *buf) } static DEVICE_ATTR_RO(phy_interface); +static ssize_t +phy_has_fixups_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct phy_device *phydev = to_phy_device(dev); + + return sprintf(buf, "%d\n", phydev->has_fixups); +} +static DEVICE_ATTR_RO(phy_has_fixups); + static struct attribute *mdio_dev_attrs[] = { &dev_attr_phy_id.attr, &dev_attr_phy_interface.attr, + &dev_attr_phy_has_fixups.attr, NULL, }; ATTRIBUTE_GROUPS(mdio_dev); |