]> git.zerfleddert.de Git - ms2-fixes/commitdiff
only activate hw-debouncing on the inputs
authorMichael Gernoth <michael@gernoth.net>
Fri, 19 Aug 2011 15:58:54 +0000 (17:58 +0200)
committerMichael Gernoth <michael@gernoth.net>
Fri, 19 Aug 2011 15:58:54 +0000 (17:58 +0200)
MS2Debounce/assets/debounce.ko
debounce.c

index a1a4e2d8fc3aedead2b501714309305f164fcf0e..f9753eb03f921f1a993a7832d39375e12bb31b02 100644 (file)
Binary files a/MS2Debounce/assets/debounce.ko and b/MS2Debounce/assets/debounce.ko differ
index d59f10af8f2a73c00b69329dc21738d6b123302c..5694d1286b780bd97005050e4f05eacff763933a 100644 (file)
@@ -337,9 +337,6 @@ static struct device debounce_device = {
        .release = debounce_release,
 };
 
        .release = debounce_release,
 };
 
-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)
 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)
@@ -350,12 +347,11 @@ static void hw_debounce_pin(int gpio, int enable) {
 static void hw_debounce(int enable) {
        int i;
 
 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);
-       }
+       if (gpio_evmi == NULL)
+               return;
 
 
-       for (i = 0; i < (sizeof(mapphone_row_gpios) / sizeof(mapphone_row_gpios[0])); i++) {
-               hw_debounce_pin(mapphone_row_gpios[i], enable);
+       for (i = 0; i < gpio_evmi->ninputs; i++) {
+               hw_debounce_pin(gpio_evmi->input_gpios[i], enable);
        }
 }
 
        }
 }
 
Impressum, Datenschutz