* Re: parport_pc disables parallel port on unload.
[not found] <bf4Tb-1sM-11@gated-at.bofh.it>
@ 2008-09-24 12:47 ` Bodo Eggert
2008-09-24 15:50 ` Bill Unruh
0 siblings, 1 reply; 3+ messages in thread
From: Bodo Eggert @ 2008-09-24 12:47 UTC (permalink / raw)
To: Bill Unruh, linux-kernel
Bill Unruh <unruh@physics.ubc.ca> wrote:
> I have a parallel port module gps.c which I have written ( after the short
> module described in Linux Device Drivers), whose purpose is to timestamp
> the occurance of interrupts on the parallel port Ack line to as high a
> temporal accuracy as possible.These are generated by the PPS line of a Gamin
> 18LVC gps receiver. Since I want the highest accuracy possible I do not want
> the latency of going through the stock drivers and waiting for a poll or
> select to let me know an interrupt has occured.
> So, could anyone point me to some relatively comprehensible documentation (
> or "canned program") to show me how to switch the parallel port back on if
> unloading parport_pc has switched it off.
You can copy/paste the relevant parts from the parport_pc driver.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: parport_pc disables parallel port on unload.
2008-09-24 12:47 ` parport_pc disables parallel port on unload Bodo Eggert
@ 2008-09-24 15:50 ` Bill Unruh
0 siblings, 0 replies; 3+ messages in thread
From: Bill Unruh @ 2008-09-24 15:50 UTC (permalink / raw)
To: Bodo Eggert; +Cc: linux-kernel
On Wed, 24 Sep 2008, Bodo Eggert wrote:
> Bill Unruh <unruh@physics.ubc.ca> wrote:
>
>> I have a parallel port module gps.c which I have written ( after the short
>> module described in Linux Device Drivers), whose purpose is to timestamp
>> the occurance of interrupts on the parallel port Ack line to as high a
>> temporal accuracy as possible.These are generated by the PPS line of a Gamin
>> 18LVC gps receiver. Since I want the highest accuracy possible I do not want
>> the latency of going through the stock drivers and waiting for a poll or
>> select to let me know an interrupt has occured.
>
>> So, could anyone point me to some relatively comprehensible documentation (
>> or "canned program") to show me how to switch the parallel port back on if
>> unloading parport_pc has switched it off.
>
> You can copy/paste the relevant parts from the parport_pc driver.
Of course, then, identifying the relevant parts becomes the problem, but
thank you.
>
>
--
William G. Unruh | Canadian Institute for| Tel: +1(604)822-3273
Physics&Astronomy | Advanced Research | Fax: +1(604)822-5324
UBC, Vancouver,BC | Program in Cosmology | unruh@physics.ubc.ca
Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/
^ permalink raw reply [flat|nested] 3+ messages in thread
* parport_pc disables parallel port on unload.
@ 2008-09-23 1:10 Bill Unruh
0 siblings, 0 replies; 3+ messages in thread
From: Bill Unruh @ 2008-09-23 1:10 UTC (permalink / raw)
To: linux-kernel
I have a parallel port module gps.c which I have written ( after the short
module described in Linux Device Drivers), whose purpose is to timestamp
the occurance of interrupts on the parallel port Ack line to as high a temporal
accuracy as possible.These are generated by the PPS line of a Gamin 18LVC
gps receiver. Since I want the highest accuracy possible I do not want the
latency of going through the stock drivers and waiting for a poll or
select to let me know an interrupt has occured.
The problem I am running into is that the parport_pc driver, if it is
unloaded, powers off the parallel port, making it useless for my purposes
(or at least I do not know how to power it up again). Now I do not think
that the parport driver should disable the port when it is unloaded, but
rather leave it in the state it was in when the module was loaded, but the
maintainer of parport_pc (alan@lxorguk.ukuu.org.uk) disagrees with me,
and he is doing the maintaining, not me.
So, could anyone point me to some relatively comprehensible documentation (
or "canned program") to show me how to switch the parallel port back on if
unloading parport_pc has switched it off. I assume it can be switched on
again. Alternatively, how to tell parport_pc to release the registers of
the parallel port so I can run my module even if parport_pc is loaded.
(that of course sounds dangerous and could lead to contention)
Having the interrupt be processed first by parport_pc and then by my
userland program sounds like a recipie for long and variable latency (I am
talking in terms of usec). (Mind you I hae not measured it but the direct
interrupt is of the order of 1usec).
If parport_pc is not loaded first, then my program runs fine. And the clock
discipline and scatter using ntp is of the order of 2usec, and I suspect much of that
is ntp's relatively poor clock discipline algorithm (in comparison with the
best possible) rather than problems with latency in the clock reading.
Thanks
Bill
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-24 15:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bf4Tb-1sM-11@gated-at.bofh.it>
2008-09-24 12:47 ` parport_pc disables parallel port on unload Bodo Eggert
2008-09-24 15:50 ` Bill Unruh
2008-09-23 1:10 Bill Unruh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®