struct gpio_key_state *key_state;
unsigned long irqflags;
uint8_t debounce;
+ bool sync_needed;
#if 0
key_entry = kp->keys_info->keymap;
#endif
key_entry = ds->info->keymap;
key_state = ds->key_state;
+ sync_needed = false;
spin_lock_irqsave(&ds->irq_lock, irqflags);
for (i = 0; i < nkeys; i++, key_entry++, key_state++) {
debounce = key_state->debounce;
key_entry->code, i, key_entry->gpio, pressed);
input_event(ds->input_devs->dev[key_entry->dev], ds->info->type,
key_entry->code, pressed);
+ sync_needed = true;
+ }
+ if (sync_needed) {
+ for (i = 0; i < ds->input_devs->count; i++)
+ input_sync(ds->input_devs->dev[i]);
}
#if 0
key_entry->gpio, pressed);
input_event(ds->input_devs->dev[key_entry->dev], ds->info->type,
key_entry->code, pressed);
+ input_sync(ds->input_devs->dev[key_entry->dev]);
}
return IRQ_HANDLED;
}