diff options
author | Nicolas Boullis <nboullis@debian.org> | 2016-04-10 13:23:05 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-05-20 12:33:51 +0200 |
commit | 5919fb97dd85e7ee200ab60151244cca62f61368 (patch) | |
tree | a6ffeb2cdca89a68d9979864b31e0c49efc380bf /drivers/nvdimm/bus.c | |
parent | 1d87951c398e35118a0fb67b287022f008513f42 (diff) |
rtc: ds1307: ensure that any pending alarm is cleared before a new alarm is enabled
If a previously-set alarm was disabled and then triggered, it may still
be pending when a new alarm is configured.
Then, if the alarm is enabled before the pending alarm is cleared, then
an interrupt is immediately raised.
Unfortunately, when the alarm is cleared and enabled during the same I²C
block write, the chip (at least the DS1339 I have) considers that the
alarm is enabled before it is cleared, and raises an interrupt.
This patch ensures that the pending alarm is cleared before the alarm is
enabled.
Signed-off-by: Nicolas Boullis <nboullis@debian.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/nvdimm/bus.c')
0 files changed, 0 insertions, 0 deletions