[LinuxPPS] Re: LinuxPPS evolution.

Cirilo Bernardo cbernardo at auspace.com.au
Wed Nov 14 00:18:01 CET 2007


> The LinuxPPS has evolved over the last year from something very
> different to the code in its present form.
>
> I guess I have to ask the question why we have the /dev/pps<n> file
> at all in its current implementation.
>
> It would seem that all the discussion that we have been having about
> parent/child files and opening this before you can do that, would
> just go away IF the ioctl that we currently do on the pps<n> file
> was done on the 'parent' file instead.  The internal code could remain the
> same (almost) but the ioctl would be done on the parent rather than
> the child.

I disagree with the last bit on the following reasons:
1. There is not necessarily a parent in the /dev directory because
it does not always make sense to create such a parent. The parent
of course exists in the driver structure but does not have an entry
in /dev and has no file operations.
2. The serial code is working as intended - it may be a nuisance for
people working with PPS, but to be honest the original intention of the
serial code was to work with a single device, not to have multiple
devices making use of the modem status lines to send signals to other
software. To get around the PPS/DCD issue, the parent device may be
opened when the PPS device is first opened but even this is not a good
solution because it really is only useful when serial ports are used.


> For things to work these two (parent / child) clearly know about one
> another so moving the ioctl to the other device (or adding a 2nd ioctl)
> would seem possible.

No, the parent/child do not know about eachother. The child only knows
of the parent if the 'parent' parameter is set - setting the parent
cannot be mandatory because, as mentioned above, some parents have no
/dev entry because such an entry makes no sense. In turn, I can't imagine
how the child can possibly know anything about the parent.


> And we would be back to an API that everyone understands, just one
> file for our standard case.  Whether the /dev/pps<n> files (and an ioctl
> there) would be useful for some of Rodolfo's strange devices is a question
> I can't answer).
>
> Is this crazy or possible

This reminds me of the message I wrote several weeks ago about reworking
PPS to have something that made more sense.  It seems that there is no
point because in the real world people are doing all sorts of things which
make it pretty much impossible to make any great improvements on the current
PPS.

- Cirilo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ml.enneenne.com/pipermail/linuxpps/attachments/20071114/d28da890/attachment.htm


More information about the LinuxPPS mailing list