Re: [Intel PMC TGPIO Driver 3/5] drivers/ptp: Add user-space input polling interface

From: Richard Cochran
Date: Sun Feb 02 2020 - 21:29:00 EST


On Wed, Dec 11, 2019 at 01:48:50PM -0800, christopher.s.hall@xxxxxxxxx wrote:
> From: Christopher Hall <christopher.s.hall@xxxxxxxxx>
>
> The Intel PMC Time-Aware GPIO controller doesn't implement interrupts to
> notify software that an input event has occurred. To solve this problem,
> implement a user-space polling interface allowing the application to check
> for input events. The API returns an event count and time. This interface
> (EVENT_COUNT_TSTAMP2) is *reused* from the output frequency adjustment API.
> The event count delta indicates that one or more events have occurred and
> how many events may have been missed.

So I think this interface is truly horrible.

The ptp_pin_desc describes a pin's configuration WRT the PTP_PF_xxx
and the specific EXTTS/PEROUT_REQUEST channel. I don't know exactly
what you are trying to accomplish, but there has got to be a better
way. Re-using the ptp_pin_desc for a polling interface is surely not
the way forward.

Thanks,
Richard