From: Dmitry Lavnikevich <D.Lavnikevich@sam-solutions.com>
To: "Opensource [Steve Twiss]" <stwiss.opensource@diasemi.com>
Cc: Support Opensource <Support.Opensource@diasemi.com>,
"a.zummo@towertech.it" <a.zummo@towertech.it>,
"rtc-linux@googlegroups.com" <rtc-linux@googlegroups.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rtc: da9063: Fix ALARM interrupt registration.
Date: Thu, 20 Nov 2014 13:09:16 +0000 [thread overview]
Message-ID: <8A823154-DC33-4A5A-9B4B-8B0E3BCFE83C@sam-solutions.com> (raw)
In-Reply-To: <6ED8E3B22081A4459DAC7699F3695FB7D0B4836D@SW-EX-MBX02.diasemi.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2150 bytes --]
> On 20Nov, 2014, at 12:23, Opensource [Steve Twiss] <stwiss.opensource@diasemi.com> wrote:
>
> 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/
Yes, Iâve seen this patch for da9055.
I have no hardware with da9055 to test it but as I understood from
da9055-core.c sources the difference is in regmap_add_irq_chip()
call. Looks like passing irq_base = -1 to it dynamically allocates
irq_base so call regmap_irq_chip_get_base() then returns base for
virtual IRQ.
In case of da9063 there is no use of
regmap_add_irq_chip/regmap_irq_chip_get_base and because of that
da9063-core registeres IRQ using irq_base=0 and therefore is local
instead of virtual.
>> ---
>> 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
I have tested this patch on pfla02 board and it was ok. On which
board this fail occured?
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2014-11-20 13:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 9:54 Dmitry Lavnikevich
2014-11-20 11:23 ` Opensource [Steve Twiss]
2014-11-20 13:09 ` Dmitry Lavnikevich [this message]
2014-11-20 14:43 ` Opensource [Steve Twiss]
2014-11-21 12:04 ` Dmitry Lavnikevich
2014-11-21 13:23 ` Opensource [Steve Twiss]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8A823154-DC33-4A5A-9B4B-8B0E3BCFE83C@sam-solutions.com \
--to=d.lavnikevich@sam-solutions.com \
--cc=Support.Opensource@diasemi.com \
--cc=a.zummo@towertech.it \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
--cc=stwiss.opensource@diasemi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®