#define PREFIX "debounce: "
-static int debounce_delay = 15;
-
static unsigned old_flags = 0;
ktime_t old_debounce_delay;
ktime_t old_settle_time;
ktime_t old_poll_time;
static struct gpio_event_matrix_info *gpio_evmi = NULL;
-module_param(debounce_delay, int, S_IRUSR | S_IRGRP | S_IROTH);
-MODULE_PARM_DESC(debounce_delay, "debouncing delay (ms), default: 15");
-
static int find_ms2_dev(struct device *dev, void *data)
{
if (!strncmp((char*)data, dev_name(dev), strlen((char*)data))) {
if (gpio_evmi->debounce_delay.tv.nsec != delay * NSEC_PER_MSEC) {
printk(KERN_INFO PREFIX "Changing debounce_delay\n");
gpio_evmi->debounce_delay.tv.nsec = delay * NSEC_PER_MSEC;
- debounce_delay = delay;
printk(KERN_INFO PREFIX "debounce_delay: %u\n", gpio_evmi->debounce_delay.tv.nsec);
}
old_poll_time = gpio_evmi->poll_time;
old_flags = gpio_evmi->flags;
- set_debounce_delay(debounce_delay);
-
printk(KERN_INFO PREFIX "flags: 0x%x\n", gpio_evmi->flags);
return 0;