aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-at32ap700x.c
Commit message (Collapse)AuthorAge
* rtc: bunch of drivers: fix 'no irq' case handingAnton Vorontsov2009-01-06
| | | | | | | | | | | | | | | | | | This patch fixes a bunch of irq checking misuses. Most drivers were getting irq via platform_get_irq(), which returns -ENXIO or r->start. rtc-cmos.c is special. It is using PNP and platform bindings. Hopefully nobody is using PNP IRQ 0 for RTC. So the changes should be safe. rtc-sh.c is using platform_get_irq, but was storing a result into an unsigned type, then was checking for < 0. This is fixed now. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc-at32ap700x: Enable wakeupHaavard Skinnemoen2008-07-02
| | | | | | | | | Call device_init_wakeup() to signal that the RTC is capable of waking the system. This is needed for rtcwake to work. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Cc: Alessandro Zummo <a.zummo@towertech.it>
* rtc-at32ap700x: fix bug in at32_rtc_readalarm()Haavard Skinnemoen2008-06-12
| | | | | | | | | | | | | | | alarm->pending indicates whether there's an alarm that has actually been triggered, not whether we're waiting for it. alarm->enabled indicates that. Also add missing locking around reading the RTC registers. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc: fix platform driver hotplug/coldplugKay Sievers2008-04-11
| | | | | | | | | | | | | | Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable RTC platform drivers, to re-enable module auto loading. [dbrownell@users.sourceforge.net: more drivers, minor fix] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Greg KH <greg@kroah.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc-at32ap700x: fix irq init oopsDavid Brownell2007-12-17
| | | | | | | | | | | | Reorder at32_rtc_probe() so that it's safe (no oopsing) to fire the IRQ handler the instant that it's registered. (Bug noted via "Debug shared IRQ handlers" kernel debug option.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: <hcegtvedt@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Driver for the Atmel on-chip RTC on AT32AP700x devicesHans-Christian Egtvedt2007-07-17
Tested on the AT32AP7000/ATSTK1000. Driver does only suport time, wake up and a very simple alarm, because of hardware limitations. Hardware documentation can be found in the AT32AP7000 data sheet, which can be downloaded from http://www.atmel.com/dyn/products/datasheets.asp?family_id=682 From: David Brownell <david-b@pacbell.net> - Strike some alarm setup code that's no longer needed. (This patch seems to have gotten lost somewhere...) - Make the driver name (and its module alias) match what the platform setup code uses, so the driver can bind and hotplug. [akpm@linux-foundation.org: fix several checkpatch.pl warnings] Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>