Re: [net-next PATCH] octeontx2-pf: Enable PTP PPS output support

From: Richard Cochran
Date: Tue Sep 12 2023 - 17:29:28 EST


On Tue, Sep 12, 2023 at 11:21:16PM +0530, Sai Krishna wrote:

> + case PTP_CLK_REQ_PEROUT:
> + if (rq->perout.flags)
> + return -EOPNOTSUPP;
> +
> + if (rq->perout.index >= ptp_info->n_pins)
> + return -EINVAL;
> + if (on) {
> + period = rq->perout.period.sec * NSEC_PER_SEC +
> + rq->perout.period.nsec;
> + ptp_pps_on(ptp, on, period);
> + } else {
> + ptp_pps_on(ptp, on, period);
> }
> return 0;
> default:
> @@ -411,6 +425,7 @@ int otx2_ptp_init(struct otx2_nic *pfvf)
> .name = "OcteonTX2 PTP",
> .max_adj = 1000000000ull,
> .n_ext_ts = 1,
> + .n_per_out = 1,

Thanks for using the "per_out" API for PPS output instead of...

> .n_pins = 1,
> .pps = 0,

this one (which has a misleading name) !

Acked-by: Richard Cochran <richardcochran@xxxxxxxxx>