diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2019-02-04 11:26:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-04 18:33:36 -0800 |
commit | 5468e82f7034f0ae175a3ce075441356099bdaa3 (patch) | |
tree | 9176781d042f78f4c3e16760fc01b73ef72fa9ea /arch/mips/ar7 | |
parent | fc9c5a4a5a570571fa5a0d472ad7a637ceda6b7e (diff) | |
download | linux-5468e82f7034f0ae175a3ce075441356099bdaa3.tar.gz linux-5468e82f7034f0ae175a3ce075441356099bdaa3.tar.bz2 linux-5468e82f7034f0ae175a3ce075441356099bdaa3.zip |
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 'arch/mips/ar7')
-rw-r--r-- | arch/mips/ar7/platform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index f09262e0a72f..10ff07b7721e 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c @@ -683,7 +683,7 @@ static int __init ar7_register_devices(void) if (ar7_has_high_cpmac()) { res = fixed_phy_add(PHY_POLL, cpmac_high.id, - &fixed_phy_status, -1); + &fixed_phy_status); if (!res) { cpmac_get_mac(1, cpmac_high_data.dev_addr); @@ -696,7 +696,7 @@ static int __init ar7_register_devices(void) } else cpmac_low_data.phy_mask = 0xffffffff; - res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status, -1); + res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status); if (!res) { cpmac_get_mac(0, cpmac_low_data.dev_addr); res = platform_device_register(&cpmac_low); |