diff options
author | Andrew Lunn <andrew@lunn.ch> | 2015-08-31 09:56:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-31 17:48:02 -0400 |
commit | a5597008dbc230876db2d344561d634f4d52ea4a (patch) | |
tree | 5c3d98a0f89ba1590c251eef871074161271aa72 /include/linux/phy_fixed.h | |
parent | 8b59d19e749b8cb454b7912396c2a6a1b91b9d30 (diff) |
phy: fixed_phy: Add gpio to determine link up/down.
An SFP module may have a link up/down status pin which can be
connection to a GPIO line of the host. Add support for reading such an
GPIO in the fixed_phy driver.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy_fixed.h')
-rw-r--r-- | include/linux/phy_fixed.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/phy_fixed.h b/include/linux/phy_fixed.h index fe5732d53eda..2400d2ea4f34 100644 --- a/include/linux/phy_fixed.h +++ b/include/linux/phy_fixed.h | |||
@@ -13,9 +13,11 @@ struct device_node; | |||
13 | 13 | ||
14 | #if IS_ENABLED(CONFIG_FIXED_PHY) | 14 | #if IS_ENABLED(CONFIG_FIXED_PHY) |
15 | extern int fixed_phy_add(unsigned int irq, int phy_id, | 15 | extern int fixed_phy_add(unsigned int irq, int phy_id, |
16 | struct fixed_phy_status *status); | 16 | struct fixed_phy_status *status, |
17 | int link_gpio); | ||
17 | extern struct phy_device *fixed_phy_register(unsigned int irq, | 18 | extern struct phy_device *fixed_phy_register(unsigned int irq, |
18 | struct fixed_phy_status *status, | 19 | struct fixed_phy_status *status, |
20 | int link_gpio, | ||
19 | struct device_node *np); | 21 | struct device_node *np); |
20 | extern void fixed_phy_del(int phy_addr); | 22 | extern void fixed_phy_del(int phy_addr); |
21 | extern int fixed_phy_set_link_update(struct phy_device *phydev, | 23 | extern int fixed_phy_set_link_update(struct phy_device *phydev, |
@@ -26,12 +28,14 @@ extern int fixed_phy_update_state(struct phy_device *phydev, | |||
26 | const struct fixed_phy_status *changed); | 28 | const struct fixed_phy_status *changed); |
27 | #else | 29 | #else |
28 | static inline int fixed_phy_add(unsigned int irq, int phy_id, | 30 | static inline int fixed_phy_add(unsigned int irq, int phy_id, |
29 | struct fixed_phy_status *status) | 31 | struct fixed_phy_status *status, |
32 | int link_gpio) | ||
30 | { | 33 | { |
31 | return -ENODEV; | 34 | return -ENODEV; |
32 | } | 35 | } |
33 | static inline struct phy_device *fixed_phy_register(unsigned int irq, | 36 | static inline struct phy_device *fixed_phy_register(unsigned int irq, |
34 | struct fixed_phy_status *status, | 37 | struct fixed_phy_status *status, |
38 | int gpio_link, | ||
35 | struct device_node *np) | 39 | struct device_node *np) |
36 | { | 40 | { |
37 | return ERR_PTR(-ENODEV); | 41 | return ERR_PTR(-ENODEV); |