Hello, this series addresses the issued reported at https://bugs.debian.org/794266.
The problem at hand is that some qnap NAS devices can wake up on rtc alarm and the s35390a driver didn't handle the particularities of the rtc: When an irq is pending the irq line is pulled low and the INT2 bit in a status register is set. Unfortunately this INT2 is cleared when the status register is read, but the irq line isn't deasserted at the same time. (No cookie for the hardware engineer!) So the driver (which doesn't pay attention at the first read of the status register) cannot notice that the irq is pending and so doesn't disable it which makes the NAS wake up instantly after shutdown. Among other fixes this series makes the driver aware on the first read of the status register to check for the INT2 flag and handle accordingly. Note that this means that if the RTC is already in the state that the irq is active but the status register was already read, this is still not noticed (because that's impossible AFAIK). But it should make it harder to enter this state. Best regards Uwe Uwe Kleine-König (5): rtc: s35390a: fix reading out alarm rtc: s35390a: implement reset routine as suggested by the reference rtc: s35390a: improve irq handling rtc: s35390a: improve two comments in .set_alarm rtc: fix a typo and reduce three empty lines to one drivers/rtc/interface.c | 4 +- drivers/rtc/rtc-s35390a.c | 149 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 112 insertions(+), 41 deletions(-) -- 2.8.1 -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
