aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorBibek Basu <bibek.basu@stericsson.com>2011-02-09 00:32:35 -0500
committerLinus Walleij <linus.walleij@linaro.org>2011-03-28 02:47:17 -0400
commit0cb3fcd72cc3e6dd88f0e769746d294e5e6bafa9 (patch)
treeed04e6b37c1c92eb1e9b0aed99cc98a3b6193fc7 /drivers/mfd
parent18bcd0c8cb7d85a9063b88ec810dc1cdc0974518 (diff)
gpio: driver for 42 AB8500 GPIO pins
To get rid of port expanders, the free GPIOs of ab8500 can be used. There are 42 GPIO pins. Out of which 16 are interrupt capable.This patch implements 16 virtual IRQ mapped to 16 interrupt capable AB8500 GPIOs. Signed-off-by: Bibek Basu <bibek.basu@stericsson.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> [Renamed header file as per MFD structure] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/ab8500-core.c14
-rw-r--r--drivers/mfd/ab8500-i2c.c2
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 62e33e2258d4..67d01c938284 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -362,6 +362,15 @@ static void ab8500_irq_remove(struct ab8500 *ab8500)
362 } 362 }
363} 363}
364 364
365static struct resource ab8500_gpio_resources[] = {
366 {
367 .name = "GPIO_INT6",
368 .start = AB8500_INT_GPIO6R,
369 .end = AB8500_INT_GPIO41F,
370 .flags = IORESOURCE_IRQ,
371 }
372};
373
365static struct resource ab8500_gpadc_resources[] = { 374static struct resource ab8500_gpadc_resources[] = {
366 { 375 {
367 .name = "HW_CONV_END", 376 .name = "HW_CONV_END",
@@ -596,6 +605,11 @@ static struct mfd_cell ab8500_devs[] = {
596 .name = "ab8500-regulator", 605 .name = "ab8500-regulator",
597 }, 606 },
598 { 607 {
608 .name = "ab8500-gpio",
609 .num_resources = ARRAY_SIZE(ab8500_gpio_resources),
610 .resources = ab8500_gpio_resources,
611 },
612 {
599 .name = "ab8500-gpadc", 613 .name = "ab8500-gpadc",
600 .num_resources = ARRAY_SIZE(ab8500_gpadc_resources), 614 .num_resources = ARRAY_SIZE(ab8500_gpadc_resources),
601 .resources = ab8500_gpadc_resources, 615 .resources = ab8500_gpadc_resources,
diff --git a/drivers/mfd/ab8500-i2c.c b/drivers/mfd/ab8500-i2c.c
index 6820327adf4a..821e6b86afd2 100644
--- a/drivers/mfd/ab8500-i2c.c
+++ b/drivers/mfd/ab8500-i2c.c
@@ -97,7 +97,7 @@ static void __exit ab8500_i2c_exit(void)
97{ 97{
98 platform_driver_unregister(&ab8500_i2c_driver); 98 platform_driver_unregister(&ab8500_i2c_driver);
99} 99}
100subsys_initcall(ab8500_i2c_init); 100arch_initcall(ab8500_i2c_init);
101module_exit(ab8500_i2c_exit); 101module_exit(ab8500_i2c_exit);
102 102
103MODULE_AUTHOR("Mattias WALLIN <mattias.wallin@stericsson.com"); 103MODULE_AUTHOR("Mattias WALLIN <mattias.wallin@stericsson.com");