diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-11-13 08:48:06 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-13 14:02:15 -0500 |
commit | 5b8b1fe2da98dbc4a10b9ad6d0f9f84e2815d4e4 (patch) | |
tree | 28420ffd84ec599f512e0bfb6e60e514a392ec28 /drivers/mfd/tps6586x.c | |
parent | 605511a848ae3ac4b2ce272ae6cbf8930b29ebb3 (diff) |
mfd: Add irq io-resource for tps6586x rtc sub driver
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>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/tps6586x.c')
-rw-r--r-- | 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 2cdf1e6c00c8..c11539a80fc5 100644 --- a/drivers/mfd/tps6586x.c +++ b/drivers/mfd/tps6586x.c | |||
@@ -96,12 +96,22 @@ static const struct tps6586x_irq_data tps6586x_irqs[] = { | |||
96 | [TPS6586X_INT_RTC_ALM2] = TPS6586X_IRQ(TPS6586X_INT_MASK4, 1 << 1), | 96 | [TPS6586X_INT_RTC_ALM2] = TPS6586X_IRQ(TPS6586X_INT_MASK4, 1 << 1), |
97 | }; | 97 | }; |
98 | 98 | ||
99 | static struct resource tps6586x_rtc_resources[] = { | ||
100 | { | ||
101 | .start = TPS6586X_INT_RTC_ALM1, | ||
102 | .end = TPS6586X_INT_RTC_ALM1, | ||
103 | .flags = IORESOURCE_IRQ, | ||
104 | }, | ||
105 | }; | ||
106 | |||
99 | static struct mfd_cell tps6586x_cell[] = { | 107 | static struct mfd_cell tps6586x_cell[] = { |
100 | { | 108 | { |
101 | .name = "tps6586x-gpio", | 109 | .name = "tps6586x-gpio", |
102 | }, | 110 | }, |
103 | { | 111 | { |
104 | .name = "tps6586x-rtc", | 112 | .name = "tps6586x-rtc", |
113 | .num_resources = ARRAY_SIZE(tps6586x_rtc_resources), | ||
114 | .resources = &tps6586x_rtc_resources[0], | ||
105 | }, | 115 | }, |
106 | { | 116 | { |
107 | .name = "tps6586x-onkey", | 117 | .name = "tps6586x-onkey", |
@@ -562,7 +572,7 @@ static int __devinit tps6586x_i2c_probe(struct i2c_client *client, | |||
562 | 572 | ||
563 | ret = mfd_add_devices(tps6586x->dev, -1, | 573 | ret = mfd_add_devices(tps6586x->dev, -1, |
564 | tps6586x_cell, ARRAY_SIZE(tps6586x_cell), | 574 | tps6586x_cell, ARRAY_SIZE(tps6586x_cell), |
565 | NULL, 0, NULL); | 575 | NULL, 0, tps6586x->irq_domain); |
566 | if (ret < 0) { | 576 | if (ret < 0) { |
567 | dev_err(&client->dev, "mfd_add_devices failed: %d\n", ret); | 577 | dev_err(&client->dev, "mfd_add_devices failed: %d\n", ret); |
568 | goto err_mfd_add; | 578 | goto err_mfd_add; |