Skip to content

Commit

Permalink
dp83640: let external input pins from the module parameters be defaults.
Browse files Browse the repository at this point in the history
This patch changes the driver to use the new pin configuration method when
programming the external time stamp input signals.

Signed-off-by: Richard Cochran <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
richardcochran authored and davem330 committed Mar 21, 2014
1 parent 86dd361 commit faa8971
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/phy/dp83640.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,10 @@ static int ptp_dp83640_enable(struct ptp_clock_info *ptp,
event_num = EXT_EVENT + index;
evnt = EVNT_WR | (event_num & EVNT_SEL_MASK) << EVNT_SEL_SHIFT;
if (on) {
gpio_num = gpio_tab[EXTTS0_GPIO + index];
gpio_num = 1 + ptp_find_pin(clock->ptp_clock,
PTP_PF_EXTTS, index);
if (gpio_num < 1)
return -EINVAL;
evnt |= (gpio_num & EVNT_GPIO_MASK) << EVNT_GPIO_SHIFT;
if (rq->extts.flags & PTP_FALLING_EDGE)
evnt |= EVNT_FALL;
Expand Down

0 comments on commit faa8971

Please sign in to comment.