]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rtc: rtc-at91rm9200: fix infinite wait for ACKUPD irq
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Thu, 22 May 2014 00:43:54 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:43:54 +0000 (10:43 +1000)
commitf180a60008587483e629421c2fba928545ba7b5d
tree54c9a6a34d0e0fb69e4cef1f8dbd2e474555c74b
parent9a198a86070cf55484abd352aff4ebcfc6e7ef12
rtc: rtc-at91rm9200: fix infinite wait for ACKUPD irq

The rtc user must wait at least 1 sec between each time/calandar update
(see atmel's datasheet chapter "Updating Time/Calendar").

Use the 1Hz interrupt to update the at91_rtc_upd_rdy flag and wait for the
at91_rtc_wait_upd_rdy event if the rtc is not ready.

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Reported-by: Bryan Evenson <bevenson@melinkcorp.com>
Tested-by: Bryan Evenson <bevenson@melinkcorp.com>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-at91rm9200.c