From: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
To: <support.opensource@diasemi.com>, <sameo@linux.intel.com>,
<lee.jones@linaro.org>, <lgirdwood@gmail.com>,
<broonie@kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Subject: [PATCH v2 1/2] mfd: da9063: Get irq base dynamically before registering device
Date: Fri, 21 Nov 2014 18:29:07 +0300 [thread overview]
Message-ID: <1416583748-6622-2-git-send-email-d.lavnikevich@sam-solutions.com> (raw)
In-Reply-To: <1416583748-6622-1-git-send-email-d.lavnikevich@sam-solutions.com>
After registering mfd device with proper irq_base
platform_get_irq_byname() calls will return VIRQ instead of local IRQ.
This fixes da9063 rtc registration issue:
da9063-rtc da9063-rtc: Failed to request ALARM IRQ 1: -22
Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
---
drivers/mfd/da9063-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/da9063-core.c b/drivers/mfd/da9063-core.c
index 93db8bb..f38bc98 100644
--- a/drivers/mfd/da9063-core.c
+++ b/drivers/mfd/da9063-core.c
@@ -118,7 +118,7 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq)
da9063->irq_base = pdata->irq_base;
} else {
da9063->flags = 0;
- da9063->irq_base = 0;
+ da9063->irq_base = -1;
}
da9063->chip_irq = irq;
@@ -168,6 +168,8 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq)
return ret;
}
+ da9063->irq_base = regmap_irq_chip_get_base(da9063->regmap_irq);
+
ret = mfd_add_devices(da9063->dev, -1, da9063_devs,
ARRAY_SIZE(da9063_devs), NULL, da9063->irq_base,
NULL);
--
2.1.3
next prev parent reply other threads:[~2014-11-21 15:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-21 15:29 [PATCH v2 0/2] mfd: da9063: Register device with proper irq_base Dmitry Lavnikevich
2014-11-21 15:29 ` Dmitry Lavnikevich [this message]
2014-11-24 10:07 ` [PATCH v2 1/2] mfd: da9063: Get irq base dynamically before registering device Lee Jones
2014-11-21 15:29 ` [PATCH v2 2/2] regulator: da9063: Do not transform local IRQ to virtual Dmitry Lavnikevich
2014-11-21 18:14 ` Mark Brown
2014-11-24 8:45 ` 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=1416583748-6622-2-git-send-email-d.lavnikevich@sam-solutions.com \
--to=d.lavnikevich@sam-solutions.com \
--cc=broonie@kernel.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=support.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®