Tomas Janousek
5cdc98b8f5
rtc-dev: stop periodic interrupts on device release
...
Solves http://bugzilla.kernel.org/show_bug.cgi?id=11127
The old rtc.c driver did it and some drivers (like rtc-sh) do it in their
release function, though they should not -- because they should provide
the irq_set_state op and the rtc framework itself should care about it.
This patch makes it do so.
I am aware that some drivers, like rtc-sh, handle userspace PIE sets in
their ioctl op (instead of having the framework call the op), exporting
the irq_set_state op at the same time. The logic in rtc_irq_set_state
should make sure it doesn't matter and the driver should not need to care
stopping periodic interrupts in its release routine any more.
The correct way, in my opinion, should be this:
1) The driver provides the irq_set_state op and does not care closing the
interrupts in its release op.
2) If the driver does not provide the op and handles PIE in the ioctl op, it's
reponsible for closing them in its release op.
3) Something similar for other IRQs, like UIE -- if there's no in-kernel API
like irq_set_state, handle it in ioctl and release ops. The framework will
be responsible either for everything or for nothing. (This will probably
change later.)
Signed-off-by: Tomas Janousek <tomi@nomi.cz>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
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-30 09:41:47 -07:00
..
class.c
RTC: periodic irq fix
2007-10-16 09:43:13 -07:00
hctosys.c
rtc_hctosys expects RTCs in UTC (doc)
2007-11-14 18:45:36 -08:00
interface.c
rtc: don't return -EBUSY when mutex_lock_interruptible() fails
2008-07-30 09:41:45 -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-at91rm9200: avoid spurious irqs
2008-07-24 10:47:34 -07:00
rtc-at91sam9.c
[RTC] remove references to asm/mach/time.h
2008-05-22 14:56:35 +01:00
rtc-bfin.c
Remove duplicated unlikely() in IS_ERR()
2008-04-29 08:06:25 -07:00
rtc-cmos.c
rtc-cmos: avoid spurious irqs
2008-07-24 10:47:34 -07:00
rtc-core.h
rtc-dev.c
rtc-dev: stop periodic interrupts on device release
2008-07-30 09:41:47 -07:00
rtc-ds1216.c
rtc: fix platform driver hotplug/coldplug
2008-04-11 08:06:44 -07:00
rtc-ds1302.c
rtc: replace remaining __FUNCTION__ occurrences
2008-04-28 08:58:17 -07:00
rtc-ds1305.c
rtc: ds1305/ds1306 driver
2008-07-24 10:47:33 -07:00
rtc-ds1307.c
i2c: Convert most new-style drivers to use module aliasing
2008-04-29 23:11:40 +02:00
rtc-ds1374.c
rtc-ds1374: rename device to just "ds1374"
2008-06-06 11:29:10 -07:00
rtc-ds1511.c
fix irq flags in rtc-ds1511
2008-05-08 10:46:55 -07:00
rtc-ds1553.c
rtc: fix platform driver hotplug/coldplug
2008-04-11 08:06:44 -07:00
rtc-ds1672.c
rtc: replace remaining __FUNCTION__ occurrences
2008-04-28 08:58:17 -07:00
rtc-ds1742.c
rtc: fix platform driver hotplug/coldplug
2008-04-11 08:06:44 -07:00
rtc-ep93xx.c
rtc: fix platform driver hotplug/coldplug
2008-04-11 08:06:44 -07:00
rtc-fm3130.c
rtc-fm3130: fix chip naming
2008-07-12 14:33:41 -07:00
rtc-isl1208.c
i2c: Convert most new-style drivers to use module aliasing
2008-04-29 23:11:40 +02:00
rtc-lib.c
rtc: rtc_time_to_tm: use unsigned arithmetic
2008-05-13 08:02:25 -07:00
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: fix platform driver hotplug/coldplug
2008-04-11 08:06:44 -07:00
rtc-m48t86.c
rtc: fix platform driver hotplug/coldplug
2008-04-11 08:06:44 -07:00
rtc-max6900.c
rtc: replace remaining __FUNCTION__ occurrences
2008-04-28 08:58:17 -07:00
rtc-max6902.c
rtc: replace remaining __FUNCTION__ occurrences
2008-04-28 08:58:17 -07:00
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] rtc-pl031: use proper resources, use proper apis, clean up includes
2008-05-22 14:56:36 +01:00
rtc-ppc.c
rtc: class driver for ppc_md RTC functions
2008-06-06 11:29:13 -07:00
rtc-proc.c
drivers: use non-racy method for proc entries creation (2)
2008-04-29 08:06:22 -07:00
rtc-r9701.c
rtc-r9701.c: silence compiler warning
2008-02-09 23:27:01 -08:00
rtc-rs5c313.c
rtc: replace remaining __FUNCTION__ occurrences
2008-04-28 08:58:17 -07:00
rtc-rs5c348.c
[PATCH] rtc: Make rtc-rs5c348 driver hotplug-aware
2007-08-27 02:16:58 +01:00
rtc-rs5c372.c
i2c: Convert most new-style drivers to use module aliasing
2008-04-29 23:11:40 +02:00
rtc-s3c.c
rtc: rtc-s3c: update IRQ handling
2008-07-24 10:47:34 -07:00
rtc-s35390a.c
i2c: Match dummy devices by type
2008-05-11 20:37:06 +02:00
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: rtc-sh: Fixup for 64-bit resources.
2008-05-08 19:51:45 +09:00
rtc-stk17ta8.c
rtc: fix platform driver hotplug/coldplug
2008-04-11 08:06:44 -07:00
rtc-sysfs.c
rtc: add the support for alarm time relative to current time in sysfs
2008-04-28 08:58:17 -07:00
rtc-test.c
rtc: silence section mismatch warning in rtc-test
2008-04-28 08:58:16 -07:00
rtc-v3020.c
rtc: replace remaining __FUNCTION__ occurrences
2008-04-28 08:58:17 -07:00
rtc-vr41xx.c
rtc-vr41xx: add irq_set_freq() and irq_set_state()
2008-07-24 10:47:34 -07:00
rtc-x1205.c
rtc-x1205: Fix alarm set
2008-07-04 10:40:05 -07:00