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 /arch/mips/ar7/platform.c | |
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 'arch/mips/ar7/platform.c')
-rw-r--r-- | arch/mips/ar7/platform.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index be9ff1673ded..298b97715d5f 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c | |||
@@ -679,7 +679,8 @@ static int __init ar7_register_devices(void) | |||
679 | } | 679 | } |
680 | 680 | ||
681 | if (ar7_has_high_cpmac()) { | 681 | if (ar7_has_high_cpmac()) { |
682 | res = fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status); | 682 | res = fixed_phy_add(PHY_POLL, cpmac_high.id, |
683 | &fixed_phy_status, -1); | ||
683 | if (!res) { | 684 | if (!res) { |
684 | cpmac_get_mac(1, cpmac_high_data.dev_addr); | 685 | cpmac_get_mac(1, cpmac_high_data.dev_addr); |
685 | 686 | ||
@@ -692,7 +693,7 @@ static int __init ar7_register_devices(void) | |||
692 | } else | 693 | } else |
693 | cpmac_low_data.phy_mask = 0xffffffff; | 694 | cpmac_low_data.phy_mask = 0xffffffff; |
694 | 695 | ||
695 | res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status); | 696 | res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status, -1); |
696 | if (!res) { | 697 | if (!res) { |
697 | cpmac_get_mac(0, cpmac_low_data.dev_addr); | 698 | cpmac_get_mac(0, cpmac_low_data.dev_addr); |
698 | res = platform_device_register(&cpmac_low); | 699 | res = platform_device_register(&cpmac_low); |