Messages in this thread |  | | From | Paul Gortmaker <> | Subject | Re: Problem with /dev/rtc found! | Date | Fri, 3 May 1996 11:55:48 +1000 (EST) |
| |
Ulrich Windl (Ulrich.Windl@rz.uni-regensburg.de) 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.
Regards, Paul.
|  |