[LinuxPPS] ppstest, timepps.h and the like

Hal V. Engel hvengel at astound.net
Thu Dec 17 18:13:27 CET 2009


On Wednesday 16 December 2009 03:12:05 pm Don Weeks wrote:
> On Wed, Dec 16, 2009 at 11:27 AM, Hal V. Engel <hvengel at astound.net> wrote:
> > On Tuesday 15 December 2009 05:07:55 pm Don Weeks wrote:
> > > Where are these located? I've not found them in the git archive (unless
> > > I missed something).
> >
> > In the kernel source tree located in
> >
> > Documentation/pps
> 
>    I did not get this when I checked out the LinuxPPS GIT tree and I did
>  not see it in the .32 tree at kernel.org. All I am finding in the kernel
>  tree is pps.txt.  I did however find it in some diffs I found on the wiki.

Since I have never used the GIT version I can't comment on it.  All I know is 
that when I apply a LinuxPPS patch to a kernel that I end up with these things 
in Documentation/pps.

> 
> > > Another question, I created a new source using the ktimer as an example
> >
> > but
> >
> > > using a GPIO pin as the source. My PPS signal is directed to it via a
> >
> > clock
> >
> > > line on the board.
> >
> > I don't understand this.  The ktimer source is a fake pps to be used for
> > testing only and then it is used only if you don't have a real refclock.
> 
> Hmm, maybe a better way to say this is I used the ktimer source code as a
> guide to create my driver. My driver uses a GPIO pin on a Cavium (MIPS)
> processor.
> 
> > > What is happening is that when my driver is loaded, my
> > > system rather quickly becomes unusable. Per the docs, the Ktimer is a
> >
> > good
> >
> > > example to follow and it did seem that way in that I simply removed the
> > > timing code and instead drove it through the IRQ. Based on my reading
> > > however, I am wondering if I should also be getting a "CLEAR" and
> >
> > recording
> >
> > > that?
> >
> > The ktimer pps does NOT have clear events.   It only has assert events.
> >  Only
> >  real hardware has clear events.
> >
> >
> >
> > My driver uses the GPIO pin and the PPS signal has a leading and falling
> > edge to the clock however, I believe the edge is being masked by the CPLD
> > that actually receives the interrupt and produces the GPIO interrupt to
> > the pin.

Another LinuxPPS user wrote a GPIO based pps driver about a year and a half 
ago.  He first posted about this on 6/10/08 but it looks like he never posted a 
GPIO patch.  His work predates the use of line discipline.  He was also using 
a MIPS based board (Edimax BR-6104KP) and it appears that he had pps working 
on both a serial DCD pin and a GPIO pin but only posted the serial patch.  
Since that time generalized GPIO support was added to the Linux kernel so I 
suspect that this is somewhat easier to do now then at that time.

It might make more sense to base the GPIO driver on the serial (DCD) pps 
driver code rather than ktimer since the serial code is for a real device.

> >
> > > Any help would be appreciated.
> > >         Don
> >
> > _______________________________________________
> > LinuxPPS mailing list
> > LinuxPPS at ml.enneenne.com
> > http://ml.enneenne.com/cgi-bin/mailman/listinfo/linuxpps
> > Wiki: http://wiki.enneenne.com/index.php/LinuxPPS_support
> 



More information about the LinuxPPS mailing list