aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2012-03-06 17:16:09 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-02 10:32:23 -0700
commit70068b59149237c8b27178b082e83005521204cb (patch)
tree08276992524bafd3ad9b7dfe6c9846a2db0c5c7d /include
parenta54ca770b33c0cb30da29ac6affa2e0ab8aea056 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rtc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index 93f4d035076..fcabfb4873c 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -202,7 +202,8 @@ struct rtc_device
struct hrtimer pie_timer; /* sub second exp, so needs hrtimer */
int pie_enabled;
struct work_struct irqwork;
-
+ /* Some hardware can't support UIE mode */
+ int uie_unsupported;
#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL
struct work_struct uie_task;