[lkml]   [1996]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Problem with /dev/rtc found!
Ulrich Windl (
Thu, 2 May 1996 09:48:25 +0200

> I've finally found the problem in the new RTC driver: If you enable
> periodic interrupts with a frequency of 1 Hz, the driver returns no
> error code, but interrupts just don't come. After that you can't
> enable any interrupt frequency. It seems the lowest frequency is 2Hz.

Ah, but you can't use periodic interrupts for anything slower than 2Hz.
This is directly from the 5th line of ./linux/Documentation/rtc.txt:

However it can also be used to generate signals from a slow 2Hz to a
relatively fast 8192Hz, in increments of powers of two. These signals

Regardless, accepting an invalid rate of 1Hz is a bug. Please change:

* The max we can do is 8192Hz.
- if (arg > 8192)
+ if ((arg < 2) || (arg > 8192))
return -EINVAL;
* We don't really want Joe User generating more

There is some code below this which deals with setting the frequency
to zero, which I will remove as well. There is no need to set the
frequency to zero anyway, as you just disable periodic IRQ's instead.

If you need a 1Hz signal, you can enable update interrupts which
will give you an interrupt per clock update (i.e. 1Hz).

Thanks for the report. I'll make sure that this gets changed.


 \ /
  Last update: 2005-03-22 13:37    [W:0.018 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site