mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
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>
This commit is contained in:
committed by
David S. Miller
parent
8b59d19e74
commit
a5597008db
@@ -13,9 +13,11 @@ struct device_node;
|
||||
|
||||
#if IS_ENABLED(CONFIG_FIXED_PHY)
|
||||
extern int fixed_phy_add(unsigned int irq, int phy_id,
|
||||
struct fixed_phy_status *status);
|
||||
struct fixed_phy_status *status,
|
||||
int link_gpio);
|
||||
extern struct phy_device *fixed_phy_register(unsigned int irq,
|
||||
struct fixed_phy_status *status,
|
||||
int link_gpio,
|
||||
struct device_node *np);
|
||||
extern void fixed_phy_del(int phy_addr);
|
||||
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,
|
||||
const struct fixed_phy_status *changed);
|
||||
#else
|
||||
static inline int fixed_phy_add(unsigned int irq, int phy_id,
|
||||
struct fixed_phy_status *status)
|
||||
struct fixed_phy_status *status,
|
||||
int link_gpio)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline struct phy_device *fixed_phy_register(unsigned int irq,
|
||||
struct fixed_phy_status *status,
|
||||
int gpio_link,
|
||||
struct device_node *np)
|
||||
{
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
Reference in New Issue
Block a user