All of lore.kernel.org
 help / color / mirror / Atom feed
* [rtc-linux] [PATCH v1 1/1] rtc: cmos: prevent kernel warning on IRQ flags mismatch
@ 2015-12-23 17:37 Andy Shevchenko
  2016-01-11 19:38 ` [rtc-linux] " Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2015-12-23 17:37 UTC (permalink / raw)
  To: Alexandre Belloni, rtc-linux; +Cc: Andy Shevchenko

The Microsoft Surface 3 tablet shares interrupt line between RTC and one of SPI
controllers. However, the rtc_cmos driver doesn't allow shared interrupts and
user sees the following warning

genirq: Flags mismatch irq 8. 00000080 (8086228E:02) vs. 00000000 (rtc0)
...
[<ffffffffa004eb01>] pxa2xx_spi_probe+0x151/0x600 [spi_pxa2xx_platform]

Allow RTC driver to use shared interrupts.

Seems we are on the safe side to do just this simple change since
cmos_interrupt() handler checks for the actual hardware status anyway.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/rtc/rtc-cmos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 8f7034b..84fb541 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -725,7 +725,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
 			rtc_cmos_int_handler = cmos_interrupt;
 
 		retval = request_irq(rtc_irq, rtc_cmos_int_handler,
-				0, dev_name(&cmos_rtc.rtc->dev),
+				IRQF_SHARED, dev_name(&cmos_rtc.rtc->dev),
 				cmos_rtc.rtc);
 		if (retval < 0) {
 			dev_dbg(dev, "IRQ %d is already in use\n", rtc_irq);
-- 
2.6.4

-- 
-- 
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 rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [rtc-linux] Re: [PATCH v1 1/1] rtc: cmos: prevent kernel warning on IRQ flags mismatch
  2015-12-23 17:37 [rtc-linux] [PATCH v1 1/1] rtc: cmos: prevent kernel warning on IRQ flags mismatch Andy Shevchenko
@ 2016-01-11 19:38 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2016-01-11 19:38 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: rtc-linux

On 23/12/2015 at 19:37:19 +0200, Andy Shevchenko wrote :
> The Microsoft Surface 3 tablet shares interrupt line between RTC and one of SPI
> controllers. However, the rtc_cmos driver doesn't allow shared interrupts and
> user sees the following warning
> 
> genirq: Flags mismatch irq 8. 00000080 (8086228E:02) vs. 00000000 (rtc0)
> ...
> [<ffffffffa004eb01>] pxa2xx_spi_probe+0x151/0x600 [spi_pxa2xx_platform]
> 
> Allow RTC driver to use shared interrupts.
> 
> Seems we are on the safe side to do just this simple change since
> cmos_interrupt() handler checks for the actual hardware status anyway.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/rtc/rtc-cmos.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

-- 
-- 
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 rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-11 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23 17:37 [rtc-linux] [PATCH v1 1/1] rtc: cmos: prevent kernel warning on IRQ flags mismatch Andy Shevchenko
2016-01-11 19:38 ` [rtc-linux] " Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.