Mika Westerberg <ext-mika.1.westerberg@xxxxxxxxx> writes: > + for (i = 0; i < pdata->nbuttons; i++) { > + struct gpio_keys_button *button = &pdata->buttons[i]; > + struct gpio_button_data *bdata = &ddata->data[i]; > + > + if (button->code == st->code && button->type == st->type) { > + switch (st->state) { > + case EVENT_STATE_DISABLE: > + if (bdata->state == EVENT_STATE_ENABLE) { > + bdata->state = EVENT_STATE_DISABLE; > + /* > + * Disable physical irq line. This is > + * enough also for keeping device from > + * waking up during sleep so no need > + * to change wakeup flags for this irq. > + */ > + disable_irq(gpio_to_irq(button->gpio)); Hi Mika, Did you consider what would happen when several GPIO buttons share a single IRQ? The current code does not support this (it uses IRQF_SHARED for a different reason), but this is very much possible: see for example http://thread.gmane.org/gmane.linux.kernel.input/8775 for a related thread which unfortunately died off without conclusion (but the patch went in). -- Thanks, Feri. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html