Re: [PATCH net-next v7 3/3] dpll: zl3073x: add PTP clock support
Vadim Fedorenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On 11/08/2026 14:47, Ivan Vecera wrote: > Add PTP clock support for the ZL3073x DPLL driver. A PTP clock device > is registered for each DPLL channel regardless of the initial channel > state, providing gettimex64, settime64, adjtime, adjfine, adjphase > and getmaxphase callbacks. > > Callback availability depends on the current channel state: > - adjfine: when NCO pin is connected (returns -EOPNOTSUPP otherwise) > - adjphase: available when tracking a reference, uses TIE write > - adjtime: always available and uses > * phase step for sub-second deltas when NCO pin is connected > * TIE write when tracking a reference > * plain ToD read-modify-write otherwise > - gettime/settime: always available > > The adjtime callback splits multi-second adjustments into a ToD > read-modify-write for the seconds part and a sub-second mechanism > (phase step or TIE write) for the remainder. On partial failure > where seconds were already committed, success is returned to > prevent the PTP servo from retrying and applying seconds again. > > All PTP callbacks are serialized by the existing per-DPLL zldpll->lock > mutex, which is also used by DPLL pin and device callbacks. > > Reviewed-by: Petr Oros <[email protected]> > Tested-by: Chris du Quesnay <[email protected]> > Signed-off-by: Ivan Vecera <[email protected]> It's a bit weird on formatting because of functions reordering. Anyways, main parts LGTM Reviewed-by: Vadim Fedorenko <[email protected]>