Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1382680 > unrolled thread

[PATCH] rtc: ds1307: Use irq when available for wakeup-source device

Started byNishanth Menon <nm@ti.com>
First post2016-04-19 18:30 +0200
Last post2016-04-20 01:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] rtc: ds1307: Use irq when available for wakeup-source device Nishanth Menon <nm@ti.com> - 2016-04-19 18:30 +0200
    Re: [PATCH] rtc: ds1307: Use irq when available for wakeup-source  device Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-04-20 01:00 +0200

#1382680 — [PATCH] rtc: ds1307: Use irq when available for wakeup-source device

FromNishanth Menon <nm@ti.com>
Date2016-04-19 18:30 +0200
Subject[PATCH] rtc: ds1307: Use irq when available for wakeup-source device
Message-ID<rpGHf-1h5-9@gated-at.bofh.it>
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 <tony@atomide.com>
Cc: Michael Lange <linuxstuff@milaw.biz>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---

 drivers/rtc/rtc-ds1307.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index b2156ee5bae1..74cd5cd544ee 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");
-- 
2.8.0

[toc] | [next] | [standalone]


#1382896 — Re: [PATCH] rtc: ds1307: Use irq when available for wakeup-source device

FromAlexandre Belloni <alexandre.belloni@free-electrons.com>
Date2016-04-20 01:00 +0200
SubjectRe: [PATCH] rtc: ds1307: Use irq when available for wakeup-source device
Message-ID<rpMMG-68Y-17@gated-at.bofh.it>
In reply to#1382680
On 19/04/2016 at 11:23:54 -0500, Nishanth Menon wrote :
> 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 <tony@atomide.com>
> Cc: Michael Lange <linuxstuff@milaw.biz>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> 
>  drivers/rtc/rtc-ds1307.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web