diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2019-02-04 05:26:18 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-02-04 21:33:36 -0500 |
| commit | 5468e82f7034f0ae175a3ce075441356099bdaa3 (patch) | |
| tree | 9176781d042f78f4c3e16760fc01b73ef72fa9ea /include/linux/phy_fixed.h | |
| parent | fc9c5a4a5a570571fa5a0d472ad7a637ceda6b7e (diff) | |
net: phy: fixed-phy: Drop GPIO from fixed_phy_add()
All users of the fixed_phy_add() pass -1 as GPIO number
to the fixed phy driver, and all users of fixed_phy_register()
pass -1 as GPIO number as well, except for the device
tree MDIO bus.
Any new users should create a proper device and pass the
GPIO as a descriptor associated with the device so delete
the GPIO argument from the calls and drop the code looking
requesting a GPIO in fixed_phy_add().
In fixed phy_register(), investigate the "fixed-link"
node and pick the GPIO descriptor from "link-gpios" if
this property exists. Move the corresponding code out
of of_mdio.c as the fixed phy code anyways requires
OF to be in use.
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
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, 2 insertions, 6 deletions
diff --git a/include/linux/phy_fixed.h b/include/linux/phy_fixed.h index 9525567b1951..c78fc203db43 100644 --- a/include/linux/phy_fixed.h +++ b/include/linux/phy_fixed.h | |||
| @@ -15,11 +15,9 @@ struct device_node; | |||
| 15 | #if IS_ENABLED(CONFIG_FIXED_PHY) | 15 | #if IS_ENABLED(CONFIG_FIXED_PHY) |
| 16 | extern int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier); | 16 | extern int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier); |
| 17 | extern int fixed_phy_add(unsigned int irq, int phy_id, | 17 | extern int fixed_phy_add(unsigned int irq, int phy_id, |
| 18 | struct fixed_phy_status *status, | 18 | struct fixed_phy_status *status); |
| 19 | int link_gpio); | ||
| 20 | extern struct phy_device *fixed_phy_register(unsigned int irq, | 19 | extern struct phy_device *fixed_phy_register(unsigned int irq, |
| 21 | struct fixed_phy_status *status, | 20 | struct fixed_phy_status *status, |
| 22 | int link_gpio, | ||
| 23 | struct device_node *np); | 21 | struct device_node *np); |
| 24 | extern void fixed_phy_unregister(struct phy_device *phydev); | 22 | extern void fixed_phy_unregister(struct phy_device *phydev); |
| 25 | extern int fixed_phy_set_link_update(struct phy_device *phydev, | 23 | extern int fixed_phy_set_link_update(struct phy_device *phydev, |
| @@ -27,14 +25,12 @@ extern int fixed_phy_set_link_update(struct phy_device *phydev, | |||
| 27 | struct fixed_phy_status *)); | 25 | struct fixed_phy_status *)); |
| 28 | #else | 26 | #else |
| 29 | static inline int fixed_phy_add(unsigned int irq, int phy_id, | 27 | static inline int fixed_phy_add(unsigned int irq, int phy_id, |
| 30 | struct fixed_phy_status *status, | 28 | struct fixed_phy_status *status) |
| 31 | int link_gpio) | ||
| 32 | { | 29 | { |
| 33 | return -ENODEV; | 30 | return -ENODEV; |
| 34 | } | 31 | } |
| 35 | static inline struct phy_device *fixed_phy_register(unsigned int irq, | 32 | static inline struct phy_device *fixed_phy_register(unsigned int irq, |
| 36 | struct fixed_phy_status *status, | 33 | struct fixed_phy_status *status, |
| 37 | int gpio_link, | ||
| 38 | struct device_node *np) | 34 | struct device_node *np) |
| 39 | { | 35 | { |
| 40 | return ERR_PTR(-ENODEV); | 36 | return ERR_PTR(-ENODEV); |
