]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rtc: Provide flag for rtc devices that don't support UIE
authorJohn Stultz <john.stultz@linaro.org>
Wed, 7 Mar 2012 01:16:09 +0000 (17:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 16:53:10 +0000 (09:53 -0700)
commit61d38cd909ad35ff497bf1a84cd57b2baf6d9c49
tree6bc71ca944631479792cea4f1e1764523e308b00
parentacff5ccd7dfccb0c28f367a2a684a7e8e3ee0112
rtc: Provide flag for rtc devices that don't support UIE

commit 4a649903f91232d02284d53724b0a45728111767 upstream.

Richard Weinberger noticed that on some RTC hardware that
doesn't support UIE mode, due to coarse granular alarms
(like 1minute resolution), the current virtualized RTC
support doesn't properly error out when UIE is enabled.

Instead the current code queues an alarm for the next second,
but it won't fire until up to a miniute later.

This patch provides a generic way to flag this sort of hardware
and fixes the issue on the mpc5121 where Richard noticed the
problem.

Reported-by: Richard Weinberger <richard@nod.at>
Tested-by: Richard Weinberger <richard@nod.at>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rtc/interface.c
drivers/rtc/rtc-mpc5121.c
include/linux/rtc.h