for (i = 0; i < gpio_evmi->ninputs; i++) {
int gpio = gpio_evmi->input_gpios[i];
- if (enable != -1) {
- printk(KERN_INFO PREFIX "%sabling hardware debounce for GPIO %d\n", (enable?"En":"Dis"), gpio);
- omap_set_gpio_debounce(gpio, enable);
- }
-
- if ((time != -1) && hw_debounce) {
+ if ((time != -1) && (time != hw_debounce_time) && hw_debounce) {
printk(KERN_INFO PREFIX "Setting hardware debounce time for GPIO %d to %d (%dus)\n", gpio, time, (time+1)*31);
omap_set_gpio_debounce_time(gpio, time);
}
+
+ if ((enable != -1) && (enable != hw_debounce)) {
+ printk(KERN_INFO PREFIX "%sabling hardware debounce for GPIO %d\n", (enable?"En":"Dis"), gpio);
+ omap_set_gpio_debounce(gpio, enable);
+ }
}
}