mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: <sameo@linux.intel.com>, <linus.walleij@linaro.org>,
	<grant.likely@secretlab.ca>, <akpm@linux-foundation.org>
Cc: <a.zummo@towertech.it>, <broonie@opensource.wolfsonmicro.com>,
	<linux-kernel@vger.kernel.org>, <rtc-linux@googlegroups.com>,
	Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH 1/4] mfd: palmas: add rtc irq number as irq resource for palmas-rtc
Date: Thu, 3 Jan 2013 16:16:57 +0530	[thread overview]
Message-ID: <1357210020-19876-2-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1357210020-19876-1-git-send-email-ldewangan@nvidia.com>

Palma RTC is capable of generating alarm interrupt. Pass the alarm interrupt
as IRQ_RESOURCE for palmas-rtc sub device driver so that rtc driver can get
irq as platform_get_irq().

Also pass the irq domain in mfd_add_devices() to properly offset the irqs for
sub devices. This is needed when adding device through DT.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/mfd/palmas.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 6ffd7a2..bbdbc50 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -39,6 +39,14 @@ enum palmas_ids {
 	PALMAS_USB_ID,
 };
 
+static struct resource palmas_rtc_resources[] = {
+	{
+		.start  = PALMAS_RTC_ALARM_IRQ,
+		.end    = PALMAS_RTC_ALARM_IRQ,
+		.flags  = IORESOURCE_IRQ,
+	},
+};
+
 static const struct mfd_cell palmas_children[] = {
 	{
 		.name = "palmas-pmic",
@@ -59,6 +67,8 @@ static const struct mfd_cell palmas_children[] = {
 	{
 		.name = "palmas-rtc",
 		.id = PALMAS_RTC_ID,
+		.resources = &palmas_rtc_resources[0],
+		.num_resources = ARRAY_SIZE(palmas_rtc_resources),
 	},
 	{
 		.name = "palmas-pwrbutton",
@@ -456,8 +466,8 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
 
 	ret = mfd_add_devices(palmas->dev, -1,
 			      children, ARRAY_SIZE(palmas_children),
-			      NULL, regmap_irq_chip_get_base(palmas->irq_data),
-			      NULL);
+			      NULL, 0,
+			      regmap_irq_get_domain(palmas->irq_data));
 	kfree(children);
 
 	if (ret < 0)
-- 
1.7.1.1


  reply	other threads:[~2013-01-03 10:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03 10:46 [PATCH 0/4] mfd: palma: add RTC and GPIO support Laxman Dewangan
2013-01-03 10:46 ` Laxman Dewangan [this message]
2013-01-03 10:46 ` [PATCH 2/4] mfd: palmas: add apis to access the Palmas' registers Laxman Dewangan
2013-01-03 10:46 ` [PATCH 3/4] gpio: palmas: Add support for Palams GPIO Laxman Dewangan
2013-01-10 10:57   ` Linus Walleij
2013-01-10 11:03     ` Laxman Dewangan
2013-01-10 11:05     ` Mark Brown
2013-01-17 10:34   ` Linus Walleij
2013-01-17 10:35     ` Mark Brown
2013-01-17 10:37       ` Laxman Dewangan
2013-01-17 13:58         ` [rtc-linux] " Linus Walleij
2013-01-03 10:47 ` [PATCH 4/4] rtc: palmas: add RTC driver Palmas series PMIC Laxman Dewangan
2013-01-24  4:49 ` [PATCH 0/4] mfd: palma: add RTC and GPIO support Laxman Dewangan
2013-01-27  0:28 ` Samuel Ortiz
2013-01-27  8:45   ` Laxman Dewangan
2013-01-27 21:28     ` Samuel Ortiz
2013-01-28  5:30       ` Laxman Dewangan

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=1357210020-19876-2-git-send-email-ldewangan@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=sameo@linux.intel.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®