Thanks Richard and Dale for the fast replies.

I see that it should be possible to use the ptp_feature_enable function to pass 
in an alarm time, and then when the alarm fires, use the EXTTS event mechanism 
to pass a notification/event back to the app. Hopefully this will suffice for 
our application.

Thanks, Kieran.

> On 22 Aug 2016, at 17:39, Dale Smith <dalepsm...@gmail.com> wrote:
> 
> 
> On Mon, Aug 22, 2016 at 11:34 AM, Richard Cochran <richardcoch...@gmail.com 
> <mailto:richardcoch...@gmail.com>> wrote:
> > So my questions:
> > - is the one-shot alarm functionality of the PHC actually implemented in 
> > any driver?
> 
> No.
> 
> > - how can I implement this in the freescale FEC driver without
> >   having to modify the kernel? (ptp_clock_kernel.h and
> >   drivers/ptp/ptp_clock.c)
> 
> You can't implement this without changing the kernel.
> 
> There are (currently) unused flag bits and the structures are padded out with 
> extra reserved fields.  It's possible to abuse these fields to implement 
> whatever you need.  You still need to modify the FEC (or whatever) driver, 
> but at least you don't need to plumb the changes all throughout the whole 
> kernel.
> 
> I'm not really recommending you do this, especially if this is for general 
> purpose use.  But if you really need to have a HW alarm go off with ns 
> resolution, this is one way to make it happen.  (Yes, I needed to to exactly 
> that)
> 
> Richard, thanks for having the forethought to add those extra fields!
> 
> -Dale
> 

------------------------------------------------------------------------------
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to