[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1418040187-5372-1-git-send-email-pang.xunlei@linaro.org>
Date: Mon, 8 Dec 2014 20:03:06 +0800
From: Xunlei Pang <pang.xunlei@...aro.org>
To: linux-kernel@...r.kernel.org
Cc: rtc-linux@...glegroups.com,
Alessandro Zummo <a.zummo@...ertech.it>,
John Stultz <john.stultz@...aro.org>,
Arnd Bergmann <arnd.bergmann@...aro.org>,
Xunlei Pang <pang.xunlei@...aro.org>
Subject: [PATCH 1/2] rtc/ab8500: set uie_unsupported flag
Currently, ab8500 doesn't set uie_unsupported of rtc_device, while
it doesn't support UIE, see ab8500_rtc_set_alarm().
Thus, when going through rtc_update_irq_enable()->rtc_timer_enqueue(),
there's a chance it has an alarm timer1 queued before which is going to
fired, so this update timer2 will be queued because it isn't the leftmost
one, which means rtc_timer_enqueue() will return 0.
This will result in two problems:
1) UIE EMUL will not be used.
2) When the alarm timer1 is fired, in rtc_timer_do_work() timer2 will
fail to set the alarm time, so this rtc will disfunctional due to
timer2 with the earliest expires in the timerqueue.
So, rtc drivers must set this flag if they don't support UIE.
Signed-off-by: Xunlei Pang <pang.xunlei@...aro.org>
---
drivers/rtc/rtc-ab8500.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c
index 727e2f5..866e0ef 100644
--- a/drivers/rtc/rtc-ab8500.c
+++ b/drivers/rtc/rtc-ab8500.c
@@ -504,6 +504,8 @@ static int ab8500_rtc_probe(struct platform_device *pdev)
return err;
}
+ rtc->uie_unsupported = 1;
+
return 0;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists