+static unsigned int mapphone_col_gpios[] = { 43, 53, 54, 55, 56, 57, 58, 63 };
+static unsigned int mapphone_row_gpios[] = { 34, 35, 36, 37, 38, 39, 40, 41 };
+
+static void hw_debounce_pin(int gpio, int enable) {
+ printk(KERN_INFO PREFIX "%sabling hardware debounce for GPIO %d\n", (enable?"En":"Dis"), gpio);
+ if (enable)
+ omap_set_gpio_debounce_time(gpio, GPIO_DEBOUNCE_TIME);
+ omap_set_gpio_debounce(gpio, enable);
+}
+
+static void hw_debounce(int enable) {
+ int i;
+
+ for (i = 0; i < (sizeof(mapphone_col_gpios) / sizeof(mapphone_col_gpios[0])); i++) {
+ hw_debounce_pin(mapphone_col_gpios[i], enable);
+ }
+
+ for (i = 0; i < (sizeof(mapphone_row_gpios) / sizeof(mapphone_row_gpios[0])); i++) {
+ hw_debounce_pin(mapphone_row_gpios[i], enable);
+ }
+}
+