Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1470237
| From | Gabriele Mazzotta <gabriele.mzt@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] rtc-cmos: Clear expired alarm after resume |
| Date | 2016-08-25 17:50 +0200 |
| Message-ID | <sa54J-2ST-3@gated-at.bofh.it> (permalink) |
| References | <rFgz8-1Kx-21@gated-at.bofh.it> <rGl3H-2ms-5@gated-at.bofh.it> <rGn5v-3xT-15@gated-at.bofh.it> <rGnRU-43r-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/06/2016 19:48, Alexandre Belloni wrote: > On 04/06/2016 at 18:58:59 +0200, Gabriele Mazzotta wrote : >> 2016-06-04 16:46 GMT+02:00 Alexandre Belloni >> <alexandre.belloni@free-electrons.com>: >>> On 01/06/2016 at 17:40:14 +0200, Gabriele Mazzotta wrote : >>>> If the system wakes up because of a wake alarm, the internal state >>>> of the alarm is not updated. As consequence, the state no longer >>>> reflects the actual state of the hardware and setting a new alarm >>>> is not possible until the expired alarm is cleared. >>>> >>> >>> I'm not completely sure to understand what is happening but could you >>> check whether that one is solved by >>> 2b2f5ff00f63847d95adad6289bd8b05f5983dd5 in my tree (rtc-next). >>> >> >> I picked 2b2f5ff00f63847d95adad6289bd8b05f5983dd5 and applied it >> on top of 4.7-rc1, but that didn't fix the problem. >> >> Let me explain the problem by showing you how I reproduce it: >> >> root@localhost:~# cat /proc/driver/rtc | grep alarm_IRQ >> alarm_IRQ : no >> root@localhost:~# echo +10 > /sys/class/rtc/rtc0/wakealarm >> root@localhost:~# echo mem > /sys/power/state # wait for auto-resume >> root@localhost:~# echo +10 > /sys/class/rtc/rtc0/wakealarm >> bash: echo: write error: Device or resource busy >> root@localhost:~# cat /proc/driver/rtc | grep alarm_IRQ >> alarm_IRQ : yes >> >> To set another alarm, I have to first write 0 to wakealarm. After that >> I can set what I want. This doesn't happen if the alarm fires while >> the system is awake, it happens only if the system is suspended and >> the alarm wakes it. >> >> I actually forgot to say that maybe this problem is not limited >> to rtc-cmos and that maybe a general solution could be used. >> >> I've just looked better into what is causing this and the problem >> seems to be caused by the fact that rtc_timer_do_work() is not >> executed if the timer expires while the system is suspended. >> > > I doubt this is a driver independent issues as I don't get that > behaviour on many other RTCs. I'll have a look. Hi, were you able to verify that no other driver is affect? Gabriele
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH 1/2] rtc-cmos: Clear expired alarm after resume Gabriele Mazzotta <gabriele.mzt@gmail.com> - 2016-08-25 17:50 +0200
Re: [PATCH 1/2] rtc-cmos: Clear expired alarm after resume Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-08-31 01:30 +0200
Re: [PATCH 1/2] rtc-cmos: Clear expired alarm after resume Gabriele Mazzotta <gabriele.mzt@gmail.com> - 2016-08-31 17:10 +0200
Re: [PATCH 1/2] rtc-cmos: Clear expired alarm after resume Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-08-31 18:10 +0200
csiph-web