diff options
author | Stefan Sørensen <stefan.sorensen@spectralink.com> | 2014-06-27 12:05:32 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-01 18:52:54 -0700 |
commit | e0155950f01d26c1ae82b99d13e05b2127c7b7ff (patch) | |
tree | f1b06a7e8d9ddcc41e92af359ccf49f9fe69c574 | |
parent | 6f39eb87de043ce778f584f4ae1b23c6db415a33 (diff) |
dp83640: Get calibration pin with ptp_find_pin
For consistency, use the ptp_find_pin function to get the calibration pin,
not gpio_tab.
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/dp83640.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index ab4811242458..293ad064905d 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -609,7 +609,11 @@ static void recalibrate(struct dp83640_clock *clock) u16 cal_gpio, cfg0, evnt, ptp_trig, trigger, val; trigger = CAL_TRIGGER; - cal_gpio = gpio_tab[CALIBRATE_GPIO]; + cal_gpio = 1 + ptp_find_pin(clock->ptp_clock, PTP_PF_PHYSYNC, 0); + if (cal_gpio < 1) { + pr_err("PHY calibration pin not avaible - PHY is not calibrated."); + return; + } mutex_lock(&clock->extreg_lock); |