[PATCH] rtc: da9063: Fix ALARM interrupt registration.

From: Dmitry Lavnikevich
Date: Thu Nov 20 2014 - 04:54:47 EST


Call platform_get_irq_byname() returns local IRQ number. Use
regmap_irq_get_virq() to get VIRQ instead.
This fixes rtc initialization error:
da9063-rtc da9063-rtc: Failed to request ALARM IRQ 1: -22

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@xxxxxxxxxxxxxxxxx>
---
drivers/rtc/rtc-da9063.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c
index 731ed1a..04743a6 100644
--- a/drivers/rtc/rtc-da9063.c
+++ b/drivers/rtc/rtc-da9063.c
@@ -315,6 +315,7 @@ static int da9063_rtc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, rtc);

irq_alarm = platform_get_irq_byname(pdev, "ALARM");
+ irq_alarm = regmap_irq_get_virq(da9063->regmap_irq, irq_alarm);
ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL,
da9063_alarm_event,
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
--
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/