mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: <sameo@linux.intel.com>, <grant.likely@secretlab.ca>,
	<linus.walleij@linaro.org>
Cc: <broonie@opensource.wolfsonmicro.com>, <swarren@nvidia.com>,
	<linux-kernel@vger.kernel.org>,
	Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH 2/3] mfd: tps6586x: add irq io-resource for rtc sub driver
Date: Mon, 8 Oct 2012 21:43:24 +0530	[thread overview]
Message-ID: <1349712805-10014-3-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1349712805-10014-1-git-send-email-ldewangan@nvidia.com>

Add IRQ IORESOURCE for rtc sub driver of this device.
The rtc driver can get the irq by calling platform_get_irq().

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

diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index 2cdf1e6..c11539a 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -96,12 +96,22 @@ static const struct tps6586x_irq_data tps6586x_irqs[] = {
 	[TPS6586X_INT_RTC_ALM2] = TPS6586X_IRQ(TPS6586X_INT_MASK4, 1 << 1),
 };
 
+static struct resource tps6586x_rtc_resources[] = {
+	{
+		.start  = TPS6586X_INT_RTC_ALM1,
+		.end	= TPS6586X_INT_RTC_ALM1,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
 static struct mfd_cell tps6586x_cell[] = {
 	{
 		.name = "tps6586x-gpio",
 	},
 	{
 		.name = "tps6586x-rtc",
+		.num_resources = ARRAY_SIZE(tps6586x_rtc_resources),
+		.resources = &tps6586x_rtc_resources[0],
 	},
 	{
 		.name = "tps6586x-onkey",
@@ -562,7 +572,7 @@ static int __devinit tps6586x_i2c_probe(struct i2c_client *client,
 
 	ret = mfd_add_devices(tps6586x->dev, -1,
 			      tps6586x_cell, ARRAY_SIZE(tps6586x_cell),
-			      NULL, 0, NULL);
+			      NULL, 0, tps6586x->irq_domain);
 	if (ret < 0) {
 		dev_err(&client->dev, "mfd_add_devices failed: %d\n", ret);
 		goto err_mfd_add;
-- 
1.7.1.1


  parent reply	other threads:[~2012-10-08 16:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 16:13 [PATCH 0/3] mfd: tps6586x: Convert to irq domain Laxman Dewangan
2012-10-08 16:13 ` [PATCH 1/3] mfd: Convert tps6586x to irq_domain Laxman Dewangan
2012-10-09  6:06   ` Mark Brown
2012-10-09  5:48     ` Laxman Dewangan
2012-10-09  6:23       ` Mark Brown
2012-10-09  6:04         ` Laxman Dewangan
2012-10-09  6:40           ` Mark Brown
2012-10-30 10:46             ` Laxman Dewangan
2012-10-30 10:48             ` Laxman Dewangan
2012-10-08 16:13 ` Laxman Dewangan [this message]
2012-10-09  6:07   ` [PATCH 2/3] mfd: tps6586x: add irq io-resource for rtc sub driver Mark Brown
2012-10-08 16:13 ` [PATCH 3/3] mfd: tps6586x: implement gpio_to_irq Laxman Dewangan
2012-10-09  6:07   ` Mark Brown
2012-10-10  7:49   ` Linus Walleij

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=1349712805-10014-3-git-send-email-ldewangan@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=swarren@nvidia.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®