linux/drivers/rtc
David Brownell 35d3fdd5f3 rtc-cmos: improve HPET IRQ glue
Resolve http://bugzilla.kernel.org/show_bug.cgi?id=11051 and other bugs
related to the way the HPET glue code in rtc-cmos was incomplete and
inconsistent:

 * Switch the approach so that the basic driver code flow isn't
   changed by having HPET ... instead, just have HPET shadow the
   RTC_CONTROL irq enables and RTC_FREQ_SELECT data.  It's only
   coping with IRQ thievery, after all.

 * Do that consistently (!!) to avoid problems when the HPET code
   is out of sync with the real RTC intent.  Examples include:

   - cmos_procfs(), which now reports correct data

   - cmos_irq_set_state() ... also removing the previous PIE_{ON,OFF}
     ioctl support so only one code path manages "periodic" IRQs

   - cmos_do_shutdown() ... currently a "just in case" change.

   - cmos_suspend() and cmos_resume() ... also handling a bug that
     was specific to HPET's IRQ thievery, where the alarm wasn't
     disabled after waking the system

 * Always call that HPET code under the RTC spinlock (it doesn't do
   its own locking)

Also clean up the HPET glue:

 * Add some comments explaining what's going on.

 * Switch to having just one #ifdef for the HPET glue, and inline
   functions (not #defines) to avoid some compiler warnings.

 * Have the probe message also report when HPET IRQs are involved

This still leaves various holes in the HPET glue, like the emulated update
IRQs being out of sync with the RTC, alarms never using day or month
matches, and many extra IRQs (at 64 Hz).

[akpm@linux-foundation.org: fix build]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Tomas Janousek <tomi@nomi.cz>
Cc: Bernhard Walle <bwalle@suse.de>
Cc: Carlos R. Mafra <crmafra@ift.unesp.br>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:34 -07:00
..
class.c
hctosys.c
interface.c Driver Core: add ability for class_find_device to start in middle of list 2008-07-21 21:54:47 -07:00
Kconfig rtc: ds1305/ds1306 driver 2008-07-24 10:47:33 -07:00
Makefile rtc: ds1305/ds1306 driver 2008-07-24 10:47:33 -07:00
rtc-at32ap700x.c rtc-at32ap700x: Enable wakeup 2008-07-02 11:05:01 +02:00
rtc-at91rm9200.c [RTC] remove unused asm/rtc.h includes from ARM RTC drivers 2008-05-22 14:56:39 +01:00
rtc-at91sam9.c
rtc-bfin.c
rtc-cmos.c rtc-cmos: improve HPET IRQ glue 2008-07-24 10:47:34 -07:00
rtc-core.h
rtc-dev.c rtc: remove BKL for ioctl() 2008-07-24 10:47:33 -07:00
rtc-ds1216.c
rtc-ds1302.c
rtc-ds1305.c rtc: ds1305/ds1306 driver 2008-07-24 10:47:33 -07:00
rtc-ds1307.c
rtc-ds1374.c rtc-ds1374: rename device to just "ds1374" 2008-06-06 11:29:10 -07:00
rtc-ds1511.c
rtc-ds1553.c
rtc-ds1672.c
rtc-ds1742.c
rtc-ep93xx.c
rtc-fm3130.c rtc-fm3130: fix chip naming 2008-07-12 14:33:41 -07:00
rtc-isl1208.c
rtc-lib.c
rtc-m41t80.c rtc: m41t80: use pr_info() as appropriate 2008-07-24 10:47:33 -07:00
rtc-m41t94.c rtc: add support for ST M41T94 SPI RTC 2008-07-24 10:47:33 -07:00
rtc-m48t59.c
rtc-m48t86.c
rtc-max6900.c
rtc-max6902.c
rtc-omap.c rtc: rtc-omap footprint shrinkage 2008-07-24 10:47:33 -07:00
rtc-pcf8563.c rtc-pcf8563: add chip id 2008-07-12 14:33:42 -07:00
rtc-pcf8583.c rtc: convert the PCF8583 driver to the new I2C style framework with device_ids 2008-07-24 10:47:34 -07:00
rtc-pl030.c [RTC] rtc-pl030: add driver, remove old non-rtc lib driver 2008-05-22 14:56:38 +01:00
rtc-pl031.c
rtc-ppc.c rtc: class driver for ppc_md RTC functions 2008-06-06 11:29:13 -07:00
rtc-proc.c
rtc-r9701.c
rtc-rs5c313.c
rtc-rs5c348.c
rtc-rs5c372.c
rtc-s3c.c [RTC] remove unused asm/rtc.h includes from ARM RTC drivers 2008-05-22 14:56:39 +01:00
rtc-s35390a.c
rtc-sa1100.c Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'omap-reviewed', 'rpc', 'rtc' and 's3c' into devel 2008-07-10 16:38:50 +01:00
rtc-sh.c
rtc-stk17ta8.c
rtc-sysfs.c
rtc-test.c
rtc-v3020.c
rtc-vr41xx.c
rtc-x1205.c rtc-x1205: Fix alarm set 2008-07-04 10:40:05 -07:00