[LinuxPPS] [RFC] time_pps_createbyname()

Frank Kardel kardel at ntp.org
Mon Aug 6 14:44:33 CEST 2007


> On Mon, Aug 06, 2007 at 01:00:05PM +0200, Frank Kardel wrote:
>
>> Yes - you got the idea (which I hope will save us all much work).
>>
>> I'd like the idea to have the PPS source by their name in sysfs.
>> It would be easier for the user to pick the right one instead of
>> having to figure out whether pps1 is ttyS0 or is it pps0 ? That would
>> again depend on configured devices and be prone to changes in the
>> environment. Maybe /dev/pps-<name><number> could work.
>
> Mmm...	so you prefere having /sys/class/pps/ttyS0/... rather than
> /sys/class/pps/01/...?

yes - just for easier identification. If something bound to a number could
change it will become an administrative hassle. So matching ttyS0
/dev/ttyS0 may be easier for users.

>
>> I don't know about the policies within Linux wrt/ sysfs, but maybe
>> a working PPS device is fine with them. After all, it would be the real
>> device anyway.
>
> I think that to get Linux inclusion we should implement one char
> device per PPS source with a proper ioctl() interface to exachange
> data with the userland.
Yepp.
> Files under /sys/ can be kept and used for
> other non-kernel tasks as looking for PPS source connected with
> /dev/ttyS1, for instance.
>
> On Mon, Aug 06, 2007 at 01:30:48PM +0200, Frank Kardel wrote:
>
>> on an afterthought I seem to recall the /dev/pps0 is the name expected
>> by
>> ATOM. Thus it would make sense to name the PPS devices differently to
>> /dev/pps* so that ATOM can also use symlinks to get pointed to the
>> correct
>> PPS device.
>
> This is not a kernel problem since files under /dev/ are created into
> userland by the sysadmin or udev. :)
>
ok.

> Ok, with this assumptions I think I should change LinuxPPS again in
> order to implement char devices... I hope that this last change may
> allow NTP and kernel inclusion! ;)
>

It should make things easier. And we can stop the work on all those
patches to refclock drver except for a final check that the refclock
driver can open a separate PPSAPI device.

> Thanks a lot,
>
> Rodolfo
>
You are welcome !

Ciao,
  Frank





More information about the LinuxPPS mailing list