[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <201111161202.15485.hartleys@visionengravers.com>
Date: Wed, 16 Nov 2011 12:02:15 -0700
From: H Hartley Sweeten <hartleys@...ionengravers.com>
To: Linux Kernel <linux-kernel@...r.kernel.org>
CC: <grant.likely@...retlab.ca>, <jamie@...ieiles.com>,
<cbouatmailru@...il.com>, <akpm@...ux-foundation.org>,
<rmk+kernel@....linux.org.uk>
Subject: basic_mmio_gpio: Add hook for simple debounce register
Some platforms using the basic memory-mapped GPIO library have
simple input debounce support that is enabled/disabled, per-input,
by setting/clearing bits in a control register. Add a hook in the
bgpio_chip structure to hold the void __iomem * for this register.
This register, and the gc.set_debounce callback should set by the
platform after calling bgpio_init() and before calling gpiochip_add().
...
err = bgpio_chip(bgc, ...);
if (err)
return err;
bgc->reg_db = platform_debounce_reg;
bgc->gc.set_debounce = platform_set_debounce_func;
return gpiochip_add(&bgc->gc);
}
Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc: Grant Likely <grant.likely@...retlab.ca>
Cc: Jamie Iles <jamie@...ieiles.com>
Cc: Anton Vorontsov <cbouatmailru@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
CC: Russell King <rmk+kernel@....linux.org.uk>
---
diff --git a/include/linux/basic_mmio_gpio.h b/include/linux/basic_mmio_gpio.h
index feb91219..9bec937 100644
--- a/include/linux/basic_mmio_gpio.h
+++ b/include/linux/basic_mmio_gpio.h
@@ -35,6 +35,7 @@ struct bgpio_chip {
void __iomem *reg_set;
void __iomem *reg_clr;
void __iomem *reg_dir;
+ void __iomem *reg_db;
/* Number of bits (GPIOs): <register width> * 8. */
int bits;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists