lkml.org 
[lkml]   [2014]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] rtc: da9063: Fix ALARM interrupt registration.
Date
On 20 November 2014 09:55 Dmitry Lavnikevich wrote:

> 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@sam-solutions.com>

Hi Dmitry,

Please refer to the previous patch :
http://patchwork.ozlabs.org/patch/329051/

Using platform_get_irq_byname() to retrieve the IRQ number
returns the VIRQ number rather than the local IRQ number for
the device. Passing that value then into regmap_irq_get_virq()
causes a failure because the function is expecting the local
IRQ number (e.g. 0, 1, 2, 3, etc).

> ---
> 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

This patch above gives the following error when running on the DA9063:

da9063-rtc da9063-rtc: Failed to request ALARM IRQ -22: -22
da9063-rtc: probe of da9063-rtc failed with error -22

Regards,
Steve


\
 
 \ /
  Last update: 2014-11-20 13:01    [W:0.118 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site