mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
pps/ptp: Allow PHC devices to adjust PPS events for known delay
Initial version by Stuart Hodgson <[email protected]> Some PHC device drivers may deliver PPS events with a significant and variable delay, but still be able to measure precisely what that delay is. Add a pps_sub_ts() function for subtracting a delay from the timestamp(s) in a PPS event, and a PTP event type (PTP_CLOCK_PPSUSR) for which the caller provides a complete PPS event. Signed-off-by: Ben Hutchings <[email protected]>
This commit is contained in:
parent
ef2c7d7b59
commit
220a60a425
3 changed files with 22 additions and 2 deletions
|
|
@ -300,6 +300,11 @@ void ptp_clock_event(struct ptp_clock *ptp, struct ptp_clock_event *event)
|
|||
pps_get_ts(&evt);
|
||||
pps_event(ptp->pps_source, &evt, PTP_PPS_EVENT, NULL);
|
||||
break;
|
||||
|
||||
case PTP_CLOCK_PPSUSR:
|
||||
pps_event(ptp->pps_source, &event->pps_times,
|
||||
PTP_PPS_EVENT, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(ptp_clock_event);
|
||||
|
|
|
|||
Loading…
Reference in a new issue