Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Jan 2012 21:25:23 +0000 (13:25 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Jan 2012 21:25:23 +0000 (13:25 -0800)
2nd round of GPIO changes for v3.3 merge window

* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6:
  GPIO: sa1100: implement proper gpiolib gpio_to_irq conversion
  gpio: pl061: remove combined interrupt
  gpio: pl061: convert to use generic irq chip
  GPIO: add bindings for managed devices
  ARM: realview: convert pl061 no irq to 0 instead of -1
  gpio: pl061: convert to use 0 for no irq
  gpio: pl061: use chained_irq_* functions in irq handler
  GPIO/pl061: Add suspend resume capability
  drivers/gpio/gpio-tegra.c: use devm_request_and_ioremap

14 files changed:
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-realview/realview_pb11mp.c
arch/arm/mach-realview/realview_pba8.c
arch/arm/mach-realview/realview_pbx.c
arch/arm/mach-sa1100/include/mach/gpio.h
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/devres.c [new file with mode: 0644]
drivers/gpio/gpio-pl061.c
drivers/gpio/gpio-sa1100.c
drivers/gpio/gpio-tegra.c
include/asm-generic/gpio.h
include/linux/amba/pl061.h

index 0069561464f9b0d6c0b2b259e151d711e8219dcb..e62962117763879cb469c172d7f464b6339608d3 100644 (file)
@@ -117,17 +117,14 @@ static void __init realview_eb_map_io(void)
 
 static struct pl061_platform_data gpio0_plat_data = {
        .gpio_base      = 0,
-       .irq_base       = -1,
 };
 
 static struct pl061_platform_data gpio1_plat_data = {
        .gpio_base      = 8,
-       .irq_base       = -1,
 };
 
 static struct pl061_platform_data gpio2_plat_data = {
        .gpio_base      = 16,
-       .irq_base       = -1,
 };
 
 static struct pl022_ssp_controller ssp0_plat_data = {
index 8fe395568a47eb8fa0070b4f8e7c8d2494b41ac0..e4abe94fb11ab4b0f0969bc565d8359aafeb17f2 100644 (file)
@@ -113,17 +113,14 @@ static void __init realview_pb1176_map_io(void)
 
 static struct pl061_platform_data gpio0_plat_data = {
        .gpio_base      = 0,
-       .irq_base       = -1,
 };
 
 static struct pl061_platform_data gpio1_plat_data = {
        .gpio_base      = 8,
-       .irq_base       = -1,
 };
 
 static struct pl061_platform_data gpio2_plat_data = {
        .gpio_base      = 16,
-       .irq_base       = -1,
 };
 
 static struct pl022_ssp_controller ssp0_plat_data = {
index 34a26011bb89aa3067fb948e84588d18c2d2b76b..127a3fd42ab13db2e8430b55166a66df9b46cfae 100644 (file)
@@ -112,17 +112,14 @@ static void __init realview_pb11mp_map_io(void)
 
 static struct pl061_platform_data gpio0_plat_data = {
        .gpio_base      = 0,
-       .irq_base       = -1,
 };
 
 static struct pl061_platform_data gpio1_plat_data = {
        .gpio_base      = 8,
-       .irq_base       = -1,
 };
 
 static struct pl061_platform_data gpio2_plat_data = {
        .gpio_base      = 16,
-       .irq_base       = -1,
 };
 
 static struct pl022_ssp_controller ssp0_plat_data = {
index d26a6def1d65af974788348614e885da0a716993..25b2e59296f8d7a5721595f2523b152e69a0034e 100644 (file)
@@ -102,17 +102,14 @@ static void __init realview_pba8_map_io(void)
 
 static struct pl061_platform_data gpio0_plat_data = {
        .gpio_base      = 0,
-       .irq_base       = -1,
 };
 
 static struct pl061_platform_data gpio1_plat_data = {
        .gpio_base      = 8,
-       .irq_base       = -1,
 };
 
 static struct pl061_platform_data gpio2_plat_data = {
        .gpio_base      = 16,
-       .irq_base       = -1,
 };
 
 static struct pl022_ssp_controller ssp0_plat_data = {
index a250fb4124bf6b5460643b56d5bc04c2124fccd4..ac715645b8606aeee172fee74ee555823881b009 100644 (file)
@@ -124,17 +124,14 @@ static void __init realview_pbx_map_io(void)
 
 static struct pl061_platform_data gpio0_plat_data = {
        .gpio_base      = 0,
-       .irq_base       = -1,
 };
 
 static struct pl061_platform_data gpio1_plat_data = {
        .gpio_base      = 8,
-       .irq_base       = -1,
 };
 
 static struct pl061_platform_data gpio2_plat_data = {
        .gpio_base      = 16,
-       .irq_base       = -1,
 };
 
 static struct pl022_ssp_controller ssp0_plat_data = {
index 703631887c94ae0de4bb66ada4913ce7e05ea4a4..a38fc4f5424166bc587dd9ec664321bb3fb1ded6 100644 (file)
@@ -51,7 +51,4 @@ static inline void gpio_set_value(unsigned gpio, int value)
 
 #define gpio_cansleep  __gpio_cansleep
 
-#define gpio_to_irq(gpio)      ((gpio < 11) ? (IRQ_GPIO0 + gpio) : \
-                                       (IRQ_GPIO11 - 11 + gpio))
-
 #endif
index 573532f7553e737c1c7cee6cc3443d67cb4f8139..37c4bd1cacd579bfe66523bc5f371d00af1969b4 100644 (file)
@@ -138,6 +138,7 @@ config GPIO_MXS
 config GPIO_PL061
        bool "PrimeCell PL061 GPIO support"
        depends on ARM_AMBA
+       select GENERIC_IRQ_CHIP
        help
          Say yes here to support the PrimeCell PL061 GPIO device
 
index 62e641e79e8f059194c0bb5315e7d46e1fd105e2..fa10df604c017badef9d8052f69e78bf84f5a24c 100644 (file)
@@ -2,7 +2,7 @@
 
 ccflags-$(CONFIG_DEBUG_GPIO)   += -DDEBUG
 
-obj-$(CONFIG_GPIOLIB)          += gpiolib.o
+obj-$(CONFIG_GPIOLIB)          += gpiolib.o devres.o
 
 # Device drivers. Generally keep list sorted alphabetically
 obj-$(CONFIG_GPIO_GENERIC)     += gpio-generic.o
diff --git a/drivers/gpio/devres.c b/drivers/gpio/devres.c
new file mode 100644 (file)
index 0000000..3dd2939
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * drivers/gpio/devres.c - managed gpio resources
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * This file is based on kernel/irq/devres.c
+ *
+ * Copyright (c) 2011 John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/module.h>
+#include <linux/gpio.h>
+#include <linux/device.h>
+#include <linux/gfp.h>
+
+static void devm_gpio_release(struct device *dev, void *res)
+{
+       unsigned *gpio = res;
+
+       gpio_free(*gpio);
+}
+
+static int devm_gpio_match(struct device *dev, void *res, void *data)
+{
+       unsigned *this = res, *gpio = data;
+
+       return *this == *gpio;
+}
+
+/**
+ *      devm_gpio_request - request a gpio for a managed device
+ *      @dev: device to request the gpio for
+ *      @gpio: gpio to allocate
+ *      @label: the name of the requested gpio
+ *
+ *      Except for the extra @dev argument, this function takes the
+ *      same arguments and performs the same function as
+ *      gpio_request().  GPIOs requested with this function will be
+ *      automatically freed on driver detach.
+ *
+ *      If an GPIO allocated with this function needs to be freed
+ *      separately, devm_gpio_free() must be used.
+ */
+
+int devm_gpio_request(struct device *dev, unsigned gpio, const char *label)
+{
+       unsigned *dr;
+       int rc;
+
+       dr = devres_alloc(devm_gpio_release, sizeof(unsigned), GFP_KERNEL);
+       if (!dr)
+               return -ENOMEM;
+
+       rc = gpio_request(gpio, label);
+       if (rc) {
+               devres_free(dr);
+               return rc;
+       }
+
+       *dr = gpio;
+       devres_add(dev, dr);
+
+       return 0;
+}
+EXPORT_SYMBOL(devm_gpio_request);
+
+/**
+ *      devm_gpio_free - free an interrupt
+ *      @dev: device to free gpio for
+ *      @gpio: gpio to free
+ *
+ *      Except for the extra @dev argument, this function takes the
+ *      same arguments and performs the same function as gpio_free().
+ *      This function instead of gpio_free() should be used to manually
+ *      free GPIOs allocated with devm_gpio_request().
+ */
+void devm_gpio_free(struct device *dev, unsigned int gpio)
+{
+
+       WARN_ON(devres_destroy(dev, devm_gpio_release, devm_gpio_match,
+               &gpio));
+       gpio_free(gpio);
+}
+EXPORT_SYMBOL(devm_gpio_free);
index 8f79c03049f38f63a842801991c019ffa77f3b2b..77c9cc70fa7753fb406b87dbbf201021b4b6eb18 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/spinlock.h>
 #include <linux/errno.h>
 #include <linux/module.h>
-#include <linux/list.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
 #include <linux/irq.h>
@@ -23,6 +22,8 @@
 #include <linux/amba/bus.h>
 #include <linux/amba/pl061.h>
 #include <linux/slab.h>
+#include <linux/pm.h>
+#include <asm/mach/irq.h>
 
 #define GPIODIR 0x400
 #define GPIOIS  0x404
 
 #define PL061_GPIO_NR  8
 
-struct pl061_gpio {
-       /* We use a list of pl061_gpio structs for each trigger IRQ in the main
-        * interrupts controller of the system. We need this to support systems
-        * in which more that one PL061s are connected to the same IRQ. The ISR
-        * interates through this list to find the source of the interrupt.
-        */
-       struct list_head        list;
+#ifdef CONFIG_PM
+struct pl061_context_save_regs {
+       u8 gpio_data;
+       u8 gpio_dir;
+       u8 gpio_is;
+       u8 gpio_ibe;
+       u8 gpio_iev;
+       u8 gpio_ie;
+};
+#endif
 
+struct pl061_gpio {
        /* Each of the two spinlocks protects a different set of hardware
         * regiters and data structurs. This decouples the code of the IRQ from
         * the GPIO code. This also makes the case of a GPIO routine call from
         * the IRQ code simpler.
         */
        spinlock_t              lock;           /* GPIO registers */
-       spinlock_t              irq_lock;       /* IRQ registers */
 
        void __iomem            *base;
-       unsigned                irq_base;
+       int                     irq_base;
+       struct irq_chip_generic *irq_gc;
        struct gpio_chip        gc;
+
+#ifdef CONFIG_PM
+       struct pl061_context_save_regs csave_regs;
+#endif
 };
 
 static int pl061_direction_input(struct gpio_chip *gc, unsigned offset)
@@ -118,46 +127,16 @@ static int pl061_to_irq(struct gpio_chip *gc, unsigned offset)
 {
        struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc);
 
-       if (chip->irq_base == NO_IRQ)
+       if (chip->irq_base <= 0)
                return -EINVAL;
 
        return chip->irq_base + offset;
 }
 
-/*
- * PL061 GPIO IRQ
- */
-static void pl061_irq_disable(struct irq_data *d)
-{
-       struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
-       int offset = d->irq - chip->irq_base;
-       unsigned long flags;
-       u8 gpioie;
-
-       spin_lock_irqsave(&chip->irq_lock, flags);
-       gpioie = readb(chip->base + GPIOIE);
-       gpioie &= ~(1 << offset);
-       writeb(gpioie, chip->base + GPIOIE);
-       spin_unlock_irqrestore(&chip->irq_lock, flags);
-}
-
-static void pl061_irq_enable(struct irq_data *d)
-{
-       struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
-       int offset = d->irq - chip->irq_base;
-       unsigned long flags;
-       u8 gpioie;
-
-       spin_lock_irqsave(&chip->irq_lock, flags);
-       gpioie = readb(chip->base + GPIOIE);
-       gpioie |= 1 << offset;
-       writeb(gpioie, chip->base + GPIOIE);
-       spin_unlock_irqrestore(&chip->irq_lock, flags);
-}
-
 static int pl061_irq_type(struct irq_data *d, unsigned trigger)
 {
-       struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
+       struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
+       struct pl061_gpio *chip = gc->private;
        int offset = d->irq - chip->irq_base;
        unsigned long flags;
        u8 gpiois, gpioibe, gpioiev;
@@ -165,7 +144,7 @@ static int pl061_irq_type(struct irq_data *d, unsigned trigger)
        if (offset < 0 || offset >= PL061_GPIO_NR)
                return -EINVAL;
 
-       spin_lock_irqsave(&chip->irq_lock, flags);
+       raw_spin_lock_irqsave(&gc->lock, flags);
 
        gpioiev = readb(chip->base + GPIOIEV);
 
@@ -194,49 +173,54 @@ static int pl061_irq_type(struct irq_data *d, unsigned trigger)
 
        writeb(gpioiev, chip->base + GPIOIEV);
 
-       spin_unlock_irqrestore(&chip->irq_lock, flags);
+       raw_spin_unlock_irqrestore(&gc->lock, flags);
 
        return 0;
 }
 
-static struct irq_chip pl061_irqchip = {
-       .name           = "GPIO",
-       .irq_enable     = pl061_irq_enable,
-       .irq_disable    = pl061_irq_disable,
-       .irq_set_type   = pl061_irq_type,
-};
-
 static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
 {
-       struct list_head *chip_list = irq_get_handler_data(irq);
-       struct list_head *ptr;
-       struct pl061_gpio *chip;
-
-       desc->irq_data.chip->irq_ack(&desc->irq_data);
-       list_for_each(ptr, chip_list) {
-               unsigned long pending;
-               int offset;
+       unsigned long pending;
+       int offset;
+       struct pl061_gpio *chip = irq_desc_get_handler_data(desc);
+       struct irq_chip *irqchip = irq_desc_get_chip(desc);
 
-               chip = list_entry(ptr, struct pl061_gpio, list);
-               pending = readb(chip->base + GPIOMIS);
-               writeb(pending, chip->base + GPIOIC);
-
-               if (pending == 0)
-                       continue;
+       chained_irq_enter(irqchip, desc);
 
+       pending = readb(chip->base + GPIOMIS);
+       writeb(pending, chip->base + GPIOIC);
+       if (pending) {
                for_each_set_bit(offset, &pending, PL061_GPIO_NR)
                        generic_handle_irq(pl061_to_irq(&chip->gc, offset));
        }
-       desc->irq_data.chip->irq_unmask(&desc->irq_data);
+
+       chained_irq_exit(irqchip, desc);
+}
+
+static void __init pl061_init_gc(struct pl061_gpio *chip, int irq_base)
+{
+       struct irq_chip_type *ct;
+
+       chip->irq_gc = irq_alloc_generic_chip("gpio-pl061", 1, irq_base,
+                                             chip->base, handle_simple_irq);
+       chip->irq_gc->private = chip;
+
+       ct = chip->irq_gc->chip_types;
+       ct->chip.irq_mask = irq_gc_mask_clr_bit;
+       ct->chip.irq_unmask = irq_gc_mask_set_bit;
+       ct->chip.irq_set_type = pl061_irq_type;
+       ct->chip.irq_set_wake = irq_gc_set_wake;
+       ct->regs.mask = GPIOIE;
+
+       irq_setup_generic_chip(chip->irq_gc, IRQ_MSK(PL061_GPIO_NR),
+                              IRQ_GC_INIT_NESTED_LOCK, IRQ_NOREQUEST, 0);
 }
 
 static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
 {
        struct pl061_platform_data *pdata;
        struct pl061_gpio *chip;
-       struct list_head *chip_list;
        int ret, irq, i;
-       static DECLARE_BITMAP(init_irq, NR_IRQS);
 
        chip = kzalloc(sizeof(*chip), GFP_KERNEL);
        if (chip == NULL)
@@ -248,7 +232,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
                chip->irq_base = pdata->irq_base;
        } else if (dev->dev.of_node) {
                chip->gc.base = -1;
-               chip->irq_base = NO_IRQ;
+               chip->irq_base = 0;
        } else {
                ret = -ENODEV;
                goto free_mem;
@@ -267,8 +251,6 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
        }
 
        spin_lock_init(&chip->lock);
-       spin_lock_init(&chip->irq_lock);
-       INIT_LIST_HEAD(&chip->list);
 
        chip->gc.direction_input = pl061_direction_input;
        chip->gc.direction_output = pl061_direction_output;
@@ -288,9 +270,11 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
         * irq_chip support
         */
 
-       if (chip->irq_base == NO_IRQ)
+       if (chip->irq_base <= 0)
                return 0;
 
+       pl061_init_gc(chip, chip->irq_base);
+
        writeb(0, chip->base + GPIOIE); /* disable irqs */
        irq = dev->irq[0];
        if (irq < 0) {
@@ -298,18 +282,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
                goto iounmap;
        }
        irq_set_chained_handler(irq, pl061_irq_handler);
-       if (!test_and_set_bit(irq, init_irq)) { /* list initialized? */
-               chip_list = kmalloc(sizeof(*chip_list), GFP_KERNEL);
-               if (chip_list == NULL) {
-                       clear_bit(irq, init_irq);
-                       ret = -ENOMEM;
-                       goto iounmap;
-               }
-               INIT_LIST_HEAD(chip_list);
-               irq_set_handler_data(irq, chip_list);
-       } else
-               chip_list = irq_get_handler_data(irq);
-       list_add(&chip->list, chip_list);
+       irq_set_handler_data(irq, chip);
 
        for (i = 0; i < PL061_GPIO_NR; i++) {
                if (pdata) {
@@ -319,13 +292,10 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
                        else
                                pl061_direction_input(&chip->gc, i);
                }
-
-               irq_set_chip_and_handler(i + chip->irq_base, &pl061_irqchip,
-                                        handle_simple_irq);
-               set_irq_flags(i+chip->irq_base, IRQF_VALID);
-               irq_set_chip_data(i + chip->irq_base, chip);
        }
 
+       amba_set_drvdata(dev, chip);
+
        return 0;
 
 iounmap:
@@ -338,6 +308,53 @@ free_mem:
        return ret;
 }
 
+#ifdef CONFIG_PM
+static int pl061_suspend(struct device *dev)
+{
+       struct pl061_gpio *chip = dev_get_drvdata(dev);
+       int offset;
+
+       chip->csave_regs.gpio_data = 0;
+       chip->csave_regs.gpio_dir = readb(chip->base + GPIODIR);
+       chip->csave_regs.gpio_is = readb(chip->base + GPIOIS);
+       chip->csave_regs.gpio_ibe = readb(chip->base + GPIOIBE);
+       chip->csave_regs.gpio_iev = readb(chip->base + GPIOIEV);
+       chip->csave_regs.gpio_ie = readb(chip->base + GPIOIE);
+
+       for (offset = 0; offset < PL061_GPIO_NR; offset++) {
+               if (chip->csave_regs.gpio_dir & (1 << offset))
+                       chip->csave_regs.gpio_data |=
+                               pl061_get_value(&chip->gc, offset) << offset;
+       }
+
+       return 0;
+}
+
+static int pl061_resume(struct device *dev)
+{
+       struct pl061_gpio *chip = dev_get_drvdata(dev);
+       int offset;
+
+       for (offset = 0; offset < PL061_GPIO_NR; offset++) {
+               if (chip->csave_regs.gpio_dir & (1 << offset))
+                       pl061_direction_output(&chip->gc, offset,
+                                       chip->csave_regs.gpio_data &
+                                       (1 << offset));
+               else
+                       pl061_direction_input(&chip->gc, offset);
+       }
+
+       writeb(chip->csave_regs.gpio_is, chip->base + GPIOIS);
+       writeb(chip->csave_regs.gpio_ibe, chip->base + GPIOIBE);
+       writeb(chip->csave_regs.gpio_iev, chip->base + GPIOIEV);
+       writeb(chip->csave_regs.gpio_ie, chip->base + GPIOIE);
+
+       return 0;
+}
+
+static SIMPLE_DEV_PM_OPS(pl061_dev_pm_ops, pl061_suspend, pl061_resume);
+#endif
+
 static struct amba_id pl061_ids[] = {
        {
                .id     = 0x00041061,
@@ -351,6 +368,9 @@ MODULE_DEVICE_TABLE(amba, pl061_ids);
 static struct amba_driver pl061_gpio_driver = {
        .drv = {
                .name   = "pl061_gpio",
+#ifdef CONFIG_PM
+               .pm     = &pl061_dev_pm_ops,
+#endif
        },
        .id_table       = pl061_ids,
        .probe          = pl061_probe,
index b6c1f6d80649a93145daef13d6fcfd042fe20e47..7eecf69362ee9d2b96d02fabc0a04ce1bdc8c3c6 100644 (file)
@@ -47,12 +47,18 @@ static int sa1100_direction_output(struct gpio_chip *chip, unsigned offset, int
        return 0;
 }
 
+static int sa1100_to_irq(struct gpio_chip *chip, unsigned offset)
+{
+       return offset < 11 ? (IRQ_GPIO0 + offset) : (IRQ_GPIO11 - 11 + offset);
+}
+
 static struct gpio_chip sa1100_gpio_chip = {
        .label                  = "gpio",
        .direction_input        = sa1100_direction_input,
        .direction_output       = sa1100_direction_output,
        .set                    = sa1100_gpio_set,
        .get                    = sa1100_gpio_get,
+       .to_irq                 = sa1100_to_irq,
        .base                   = 0,
        .ngpio                  = GPIO_MAX + 1,
 };
index 61044c889f7fec11ef8f0f6b81c78fafd15c87a3..bdc2937915906fa7a7589b02e258daccb7b024f7 100644 (file)
@@ -361,14 +361,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       if (!devm_request_mem_region(&pdev->dev, res->start,
-                                    resource_size(res),
-                                    dev_name(&pdev->dev))) {
-               dev_err(&pdev->dev, "Couldn't request MEM resource\n");
-               return -ENODEV;
-       }
-
-       regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
+       regs = devm_request_and_ioremap(&pdev->dev, res);
        if (!regs) {
                dev_err(&pdev->dev, "Couldn't ioremap regs\n");
                return -ENODEV;
index d466c8d8826de5f65cd8b1f5d60e04e125a41799..1ff4e221cb4dfc705e58ff7155835c0c68459dc9 100644 (file)
@@ -177,6 +177,10 @@ extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *labe
 extern int gpio_request_array(const struct gpio *array, size_t num);
 extern void gpio_free_array(const struct gpio *array, size_t num);
 
+/* bindings for managed devices that want to request gpios */
+int devm_gpio_request(struct device *dev, unsigned gpio, const char *label);
+void devm_gpio_free(struct device *dev, unsigned int gpio);
+
 #ifdef CONFIG_GPIO_SYSFS
 
 /*
index 2412af944f1f584dcc611e17b910e8f55eb79cfc..fb83c0453489930064067d975104b916eef674a0 100644 (file)
@@ -7,7 +7,7 @@ struct pl061_platform_data {
        unsigned        gpio_base;
 
        /* number of the first IRQ.
-        * If the IRQ functionality in not desired this must be set to NO_IRQ.
+        * If the IRQ functionality in not desired this must be set to 0.
         */
        unsigned        irq_base;