diff options
authorNishanth Menon <>2016-04-19 11:23:54 -0500
committerAlexandre Belloni <>2016-04-21 23:21:00 +0200
commit38a7a73e8ed0fa9e8cd99bb62463afbdcd23429b (patch)
parent9a3dce62cc5640d7ea17733a2bd1b57665c232b0 (diff)
rtc: ds1307: Use irq when available for wakeup-source device
With commit 8bc2a40730ec ("rtc: ds1307: add support for the DT property 'wakeup-source'") we lost the ability for rtc irq functionality for devices that are actually hooked on a real IRQ line and have capability to wakeup as well. This is not an expected behavior. So, instead of just not requesting IRQ, skip the IRQ requirement only if interrupts are not defined for the device. Fixes: 8bc2a40730ec ("rtc: ds1307: add support for the DT property 'wakeup-source'") Reported-by: Tony Lindgren <> Cc: Michael Lange <> Cc: Alexandre Belloni <> Signed-off-by: Nishanth Menon <> Signed-off-by: Alexandre Belloni <>
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index ee3cae2f212e..ecb7dbae9be9 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -1531,7 +1531,7 @@ read_rtc:
return PTR_ERR(ds1307->rtc);
- if (ds1307_can_wakeup_device) {
+ if (ds1307_can_wakeup_device && ds1307->client->irq <= 0) {
/* Disable request for an IRQ */
want_irq = false;
dev_info(&client->dev, "'wakeup-source' is set, request for an IRQ is disabled!\n");