Skip to content

Commit

Permalink
pps: add parallel port PPS signal generator
Browse files Browse the repository at this point in the history
Add PPS signal generator which utilizes STROBE pin of a parallel port to
send PPS signals.  It uses parport abstraction layer and hrtimers to
precisely control the signal.

Signed-off-by: Alexander Gordeev <[email protected]>
Cc: Rodolfo Giometti <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ago authored and torvalds committed Jan 13, 2011
1 parent 46b402a commit 563558b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 1 addition & 5 deletions drivers/pps/generators/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
# PPS generators configuration
#

if PPS

comment "PPS generators support"

config PPS_GENERATOR_PARPORT
tristate "Parallel port PPS signal generator"
depends on PARPORT != n && GENERIC_TIME
depends on PARPORT
help
If you say yes here you get support for a PPS signal generator which
utilizes STROBE pin of a parallel port to send PPS signals. It uses
parport abstraction layer and hrtimers to precisely control the signal.

endif
11 changes: 9 additions & 2 deletions drivers/pps/generators/pps_gen_parport.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,15 @@ static enum hrtimer_restart hrtimer_event(struct hrtimer *timer)
long lim, delta;
unsigned long flags;

/* NB: approx time with blocked interrupts =
send_delay + 3 * SAFETY_INTERVAL */
/* We have to disable interrupts here. The idea is to prevent
* other interrupts on the same processor to introduce random
* lags while polling the clock. getnstimeofday() takes <1us on
* most machines while other interrupt handlers can take much
* more potentially.
*
* NB: approx time with blocked interrupts =
* send_delay + 3 * SAFETY_INTERVAL
*/
local_irq_save(flags);

/* first of all we get the time stamp... */
Expand Down

0 comments on commit 563558b

Please sign in to comment.