]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
gpio: ep93xx: Rename has_debounce to has_irq
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 22 Aug 2018 20:41:05 +0000 (22:41 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 29 Aug 2018 07:08:47 +0000 (09:08 +0200)
This is closer to what the variable (per bank) actually
means. We have the .gpio_to_irq() hook registered only
when this is true.

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-ep93xx.c

index 379f2573f794fddccd01c0ae9184db3c6931337b..a81d1e7969123e190df08a299fe5c2e544792106 100644 (file)
@@ -297,25 +297,25 @@ struct ep93xx_gpio_bank {
        int             data;
        int             dir;
        int             base;
-       bool            has_debounce;
+       bool            has_irq;
 };
 
-#define EP93XX_GPIO_BANK(_label, _data, _dir, _base, _debounce)        \
+#define EP93XX_GPIO_BANK(_label, _data, _dir, _base, _has_irq) \
        {                                                       \
                .label          = _label,                       \
                .data           = _data,                        \
                .dir            = _dir,                         \
                .base           = _base,                        \
-               .has_debounce   = _debounce,                    \
+               .has_irq        = _has_irq,                     \
        }
 
 static struct ep93xx_gpio_bank ep93xx_gpio_banks[] = {
-       EP93XX_GPIO_BANK("A", 0x00, 0x10, 0, true),
-       EP93XX_GPIO_BANK("B", 0x04, 0x14, 8, true),
+       EP93XX_GPIO_BANK("A", 0x00, 0x10, 0, true), /* Bank A has 8 IRQs */
+       EP93XX_GPIO_BANK("B", 0x04, 0x14, 8, true), /* Bank B has 8 IRQs */
        EP93XX_GPIO_BANK("C", 0x08, 0x18, 40, false),
        EP93XX_GPIO_BANK("D", 0x0c, 0x1c, 24, false),
        EP93XX_GPIO_BANK("E", 0x20, 0x24, 32, false),
-       EP93XX_GPIO_BANK("F", 0x30, 0x34, 16, true),
+       EP93XX_GPIO_BANK("F", 0x30, 0x34, 16, true), /* Bank F has 8 IRQs */
        EP93XX_GPIO_BANK("G", 0x38, 0x3c, 48, false),
        EP93XX_GPIO_BANK("H", 0x40, 0x44, 56, false),
 };
@@ -370,7 +370,7 @@ static int ep93xx_gpio_add_bank(struct gpio_chip *gc, struct device *dev,
        gc->label = bank->label;
        gc->base = bank->base;
 
-       if (bank->has_debounce) {
+       if (bank->has_irq) {
                gc->set_config = ep93xx_gpio_set_config;
                gc->to_irq = ep93xx_gpio_to_irq;
        }