aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phy_fixed.h
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2015-08-31 09:56:53 -0400
committerDavid S. Miller <davem@davemloft.net>2015-08-31 17:48:02 -0400
commita5597008dbc230876db2d344561d634f4d52ea4a (patch)
tree5c3d98a0f89ba1590c251eef871074161271aa72 /include/linux/phy_fixed.h
parent8b59d19e749b8cb454b7912396c2a6a1b91b9d30 (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.h8
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)
15extern int fixed_phy_add(unsigned int irq, int phy_id, 15extern 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);
17extern struct phy_device *fixed_phy_register(unsigned int irq, 18extern 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);
20extern void fixed_phy_del(int phy_addr); 22extern void fixed_phy_del(int phy_addr);
21extern int fixed_phy_set_link_update(struct phy_device *phydev, 23extern 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
28static inline int fixed_phy_add(unsigned int irq, int phy_id, 30static 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}
33static inline struct phy_device *fixed_phy_register(unsigned int irq, 36static 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);