Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 563558b2 authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Linus Torvalds
Browse files

pps: add parallel port PPS signal generator



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: default avatarAlexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 46b402a0
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -2,16 +2,12 @@
# PPS generators configuration
# PPS generators configuration
#
#


if PPS

comment "PPS generators support"
comment "PPS generators support"


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

endif
+9 −2
Original line number Original line Diff line number Diff line
@@ -76,8 +76,15 @@ static enum hrtimer_restart hrtimer_event(struct hrtimer *timer)
	long lim, delta;
	long lim, delta;
	unsigned long flags;
	unsigned long flags;


	/* NB: approx time with blocked interrupts =
	/* We have to disable interrupts here. The idea is to prevent
	   send_delay + 3 * SAFETY_INTERVAL */
	 * 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);
	local_irq_save(flags);


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