summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-bq32k.c
diff options
context:
space:
mode:
authorUwe Kleine-König <uwe@kleine-koenig.org>2016-07-02 18:28:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-22 08:15:00 +0300
commit571c66ea070d09a5b385461f0ac1b8b8bdf74d70 (patch)
tree42ac0f92f5a4acc4cf6960c6df09fe6d279a5557 /drivers/rtc/rtc-bq32k.c
parentda5284394a085084d343dbcb9a4c8f70c80f617a (diff)
downloadlinux-571c66ea070d09a5b385461f0ac1b8b8bdf74d70.tar.xz
rtc: s35390a: improve irq handling
commit 3bd32722c827d00eafe8e6d5b83e9f3148ea7c7e upstream. On some QNAP NAS devices the rtc can wake the machine. Several people noticed that once the machine was woken this way it fails to shut down. That's because the driver fails to acknowledge the interrupt and so it keeps active and restarts the machine immediatly after shutdown. See https://bugs.debian.org/794266 for a bug report. Doing this correctly requires to interpret the INT2 flag of the first read of the STATUS1 register because this bit is cleared by read. Note this is not maximally robust though because a pending irq isn't detected when the STATUS1 register was already read (and so INT2 is not set) but the irq was not disabled. But that is a hardware imposed problem that cannot easily be fixed by software. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/rtc/rtc-bq32k.c')
0 files changed, 0 insertions, 0 deletions