From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754228Ab2JHQrl (ORCPT ); Mon, 8 Oct 2012 12:47:41 -0400 Received: from hqemgate04.nvidia.com ([216.228.121.35]:1410 "EHLO hqemgate04.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754142Ab2JHQrh (ORCPT ); Mon, 8 Oct 2012 12:47:37 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Mon, 08 Oct 2012 09:47:34 -0700 From: Laxman Dewangan To: , , CC: , , , Laxman Dewangan Subject: [PATCH 2/3] mfd: tps6586x: add irq io-resource for rtc sub driver Date: Mon, 8 Oct 2012 21:43:24 +0530 Message-ID: <1349712805-10014-3-git-send-email-ldewangan@nvidia.com> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: <1349712805-10014-1-git-send-email-ldewangan@nvidia.com> References: <1349712805-10014-1-git-send-email-ldewangan@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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