diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-12-12 16:00:28 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-13 15:55:01 -0500 |
commit | 1ac63e392e57ffbcd2b567f2c69474f3e9cb889d (patch) | |
tree | 8a595ffaeaa95336e249b8b1d19acef770001028 /include/linux/phylink.h | |
parent | d38b4afd51c19278d6c4fd29c5215ad92ffed48e (diff) | |
download | linux-1ac63e392e57ffbcd2b567f2c69474f3e9cb889d.tar.gz linux-1ac63e392e57ffbcd2b567f2c69474f3e9cb889d.tar.bz2 linux-1ac63e392e57ffbcd2b567f2c69474f3e9cb889d.zip |
net: phy: phylink: Allow setting a custom link state callback
phylink_get_fixed_state() currently consults an optional "link_gpio"
GPIO descriptor, expand this mechanism to allow specifying a custom
callback. This is necessary to support out of band link notifcation
(e.g: from an interrupt within a MMIO register).
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phylink.h')
-rw-r--r-- | include/linux/phylink.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/phylink.h b/include/linux/phylink.h index 36e342b450c7..bd137c273d38 100644 --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@ -190,6 +190,9 @@ void phylink_destroy(struct phylink *); int phylink_connect_phy(struct phylink *, struct phy_device *); int phylink_of_phy_connect(struct phylink *, struct device_node *, u32 flags); void phylink_disconnect_phy(struct phylink *); +int phylink_fixed_state_cb(struct phylink *, + void (*cb)(struct net_device *dev, + struct phylink_link_state *)); void phylink_mac_change(struct phylink *, bool up); |