From: Rodolfo Giometti <giometti@enneenne.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linuxpps@ml.enneenne.com
Subject: Re: [RFC] PPS: Implementing LinuxPPS API with new syscalls
Date: Wed, 6 Jun 2007 23:24:16 +0200 [thread overview]
Message-ID: <20070606212414.GD6497@enneenne.com> (raw)
In-Reply-To: <20070606132934.18606a17.akpm@linux-foundation.org>
On Wed, Jun 06, 2007 at 01:29:34PM -0700, Andrew Morton wrote:
> > asmlinkage long sys_time_pps_find(int cmd, int __user *source,
> > char __user *name, int namelen,
> > char __user *path, int pathlen);
Try to find a PPS source into the system giving one of its feature.
With cmd==PPS_FIND_SRC we check for a PPS source with index number
equal to *source, if *source==-1 we just ask for the first PPS source
defined into the system.
With cmd=PPS_FIND_PATH we check for a PPS source with path name equal
to path.
Selected source is returned into *source and PPS source info are
placed into path and name arrays.
> > asmlinkage long sys_time_pps_getparams(int source,
> > struct pps_params __user *params);
struct pps_params {
int api_version; /* API version # */
int mode; /* mode bits */
union pps_timeu assert_off_tu; /* offset compensation for assert */
union pps_timeu clear_off_tu; /* offset compensation for clear */
};
Given a PPS source index returns its parameters setting.
> > asmlinkage long sys_time_pps_setparams(int source,
> > const struct pps_params __user *params);
Sets PPS source parameters.
> > asmlinkage long sys_time_pps_getcap(int source, int __user *mode);
Given a PPS source index returns its functioning modes.
> > asmlinkage long sys_time_pps_fetch(int source, const int tsformat,
> > struct pps_info __user *info,
> > const struct timespec __user *timeout);
struct pps_info {
unsigned long assert_sequence; /* seq. num. of assert event */
unsigned long clear_sequence; /* seq. num. of clear event */
union pps_timeu assert_tu; /* time of assert event */
union pps_timeu clear_tu; /* time of clear event */
int current_mode; /* current mode bits */
};
Given a PPS source index, a time format and, optionally, a timeout
time returns PPS time data.
Further info on these structs can be get on RFC 2783.
Apart sys_time_pps_find() the other syscalls derive directly from RFC
2783 suggestions.
I hope these info are enough... :)
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@gnudd.com
Embedded Systems giometti@linux.it
UNIX programming phone: +39 349 2432127
next prev parent reply other threads:[~2007-06-06 21:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-05 7:25 [RFC] PPS: Implementing LinuxPPS API with new syscalls Rodolfo Giometti
2007-06-06 20:29 ` Andrew Morton
2007-06-06 21:24 ` Rodolfo Giometti [this message]
2007-06-07 10:14 ` Rodolfo Giometti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070606212414.GD6497@enneenne.com \
--to=giometti@enneenne.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxpps@ml.enneenne.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.