rtc: cmos: prevent kernel warning on IRQ flags mismatch
PATCH 1/1 rtc: cmos: prevent kernel warning on IRQ flags mismatch
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.
--- drivers/rtc/rtc-cmos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-cmos.c +1 -1
@@ -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);
Signature · 12 lines
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 [email protected]. For more options, visit https://groups.google.com/d/optout.
Alexandre Belloni
AppliedQuoted 10 lines · Andy Shevchenko
The Microsoft Surface 3 tablet shares interrupt line between RTC and one of SPI controllers. However, the
rtc_cmosdriver doesn't allow shared interrupts and user sees the following warninggenirq: 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.
Quoted 8 lines
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 <[email protected]>--- drivers/rtc/rtc-cmos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Signature · 14 lines
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 [email protected]. For more options, visit https://groups.google.com/d/optout.