From: Rodolfo Giometti <giometti@enneenne.com>
To: Satyam Sharma <satyam@infradead.org>
Cc: Satyam Sharma <satyam.sharma@gmail.com>,
Chris Friesen <cfriesen@nortel.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: LinuxPPS & spinlocks
Date: Mon, 30 Jul 2007 10:51:57 +0200 [thread overview]
Message-ID: <20070730085157.GE9840@enneenne.com> (raw)
In-Reply-To: <alpine.LFD.0.999.0707301033180.10861@enigma.security.iitk.ac.in>
On Mon, Jul 30, 2007 at 10:33:35AM +0530, Satyam Sharma wrote:
>
> Fair enough, but I think the code could become a trifle simpler/easier
> after the conversion, so probably greater chances of getting merged :-)
I see. I'll start thinging about it.
> But that's alright -- see, as I said, you're confusing between the
> "special device" that represents the *PPS source* itself, with the port
> or device that it uses to *physically* connect to the PC.
>
> In the RFC, when they say that the userspace app must open(2) the PPS
> source (as they have illustrated in the example too), they mean that
> it open(2)'s the special device/file associated with the PPS source,
> and *not* the /dev/lpXXX or /dev/ttySXXX that it might be connected
> through physically.
>
> So they mean something like /dev/pps0, /dev/pps1 etc instead. Of course,
> no such special device exists on a Linux box already, but that's fine
> and obvious! *You* are supposed to create / instantiate that when a
> pps_register_source() is done from some in-kernel subsystem.
So your are proposing to create a char device interface then using
syscalls one? In this case how do you manage the case where your GPS
antenna and PPS source are both connected with the serial port
(i.e. /dev/ttyS0)?
Currently the RFC says to you that you should open the serial port:
fd = open("/dev/ttyS0", ...);
and the passing its filedes to pps_time_create() in order to get the
corresponding PPS source handler:
pps_time_create(fd, &handler);
As you propose you need _two_ open() and not just one... and even if
you decide to open the /dev/ppsX inside the pps_time_create(), how do
you recognise _which_ /dev/ppsX is connected with filedse "fd"?
I quite sure that RFC is broken since it doesn't take in account that
a PPS source maybe not connected with any cahr device at all. I tried
to explain this problem to RFC's gurus but they never answered to me,
so I decided to resolve the problem by myself. ;)
> As I said, it's not the char device for the physical interface itself
> being discussed there. That could be parport, uart, some arbit GPIO pin
> whatever. But whenever the corresponding kernel subsystem does a
> register_source(), you could create the /dev/ppsXXX device ...
Ok, but in this case you still are _not_ RFC compliant (as showed
above). You need that users give to you _two_ devices (the serial line
and the PPS source), meanwhile, for the RFC, you just need one. So no
differences from my solution from this point of view.
> Hmm, but that's a non-standard, not-mandated-by-RFC syscall. I don't see
> how you can get this merged, really :-)
They are not-mandated-by-RFC since simply RFC _is broken_! :)
I need them (or just one of them) in order to find a PPS source into
the system. Just as you need the second device name in your solution
with char devices.
Ciao,
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-07-30 8:50 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-17 18:05 [PATCH] LinuxPPS - definitive version Rodolfo Giometti
2007-07-23 13:35 ` David Woodhouse
2007-07-23 16:04 ` Rodolfo Giometti
2007-07-23 19:28 ` Andrew Morton
2007-07-23 19:48 ` David Woodhouse
2007-07-24 8:00 ` Rodolfo Giometti
2007-07-24 13:49 ` David Woodhouse
2007-07-24 14:20 ` Rodolfo Giometti
2007-07-24 14:46 ` David Woodhouse
2007-07-24 14:52 ` David Woodhouse
2007-07-24 16:01 ` Rodolfo Giometti
2007-07-27 18:44 ` LinuxPPS & spinlocks Rodolfo Giometti
2007-07-27 19:08 ` Chris Friesen
2007-07-27 19:28 ` Rodolfo Giometti
2007-07-27 19:40 ` Chris Friesen
2007-07-27 19:45 ` Rodolfo Giometti
2007-07-27 20:47 ` Satyam Sharma
2007-07-27 23:41 ` Satyam Sharma
2007-07-29 9:50 ` Rodolfo Giometti
2007-07-30 5:03 ` Satyam Sharma
2007-07-30 8:51 ` Rodolfo Giometti [this message]
2007-07-30 9:20 ` Satyam Sharma
2007-08-01 22:14 ` Christopher Hoover
2007-08-01 23:03 ` Satyam Sharma
2007-07-29 9:57 ` Rodolfo Giometti
2007-07-29 10:00 ` Rodolfo Giometti
2007-07-30 5:09 ` Satyam Sharma
2007-07-30 8:53 ` Rodolfo Giometti
2007-07-30 9:31 ` Satyam Sharma
2007-07-29 9:17 ` Rodolfo Giometti
2007-07-30 4:19 ` Satyam Sharma
2007-07-30 8:32 ` Rodolfo Giometti
2007-07-30 9:07 ` Satyam Sharma
2007-07-30 14:55 ` Rodolfo Giometti
2007-07-30 22:01 ` Satyam Sharma
2007-07-31 8:20 ` Rodolfo Giometti
2007-07-31 18:49 ` Satyam Sharma
2007-07-31 19:44 ` Rodolfo Giometti
2007-07-31 21:15 ` Satyam Sharma
2007-07-24 14:31 ` [PATCH] LinuxPPS - definitive version Rodolfo Giometti
2007-07-24 14:45 ` David Woodhouse
2007-07-24 16:09 ` Rodolfo Giometti
2007-07-26 19:52 ` Roman Zippel
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=20070730085157.GE9840@enneenne.com \
--to=giometti@enneenne.com \
--cc=akpm@linux-foundation.org \
--cc=cfriesen@nortel.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=satyam.sharma@gmail.com \
--cc=satyam@infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox