[lkml]   [2012]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH V1] input: keyboard: gpio: Support for interrupt only key
    Hi Dmitry,

    On Monday 19 March 2012 11:36 AM, Dmitry Torokhov wrote:
    > OK, so I am generally happy with the patch; the only issue is that in
    > interrupt mode the only event type that makes sense is EV_KEY so we need
    > to make sure we do not accept anything else.

    Thanks for taking care of patch. I am ok with this policy.

    > Also, I do not think that having button_irq() that is called all the
    > time is the best solution; I;d rather pulled RQ number up into button
    > data.

    Yes, this is nice cleanups.

    > I tried doing the above in the patch below. Please let me know if it
    > still works for you. Note that it depends on some other patches for
    > gpio_keys that I have; I am attaching them for your reference.

    This works fine with one small change.
    The function gpio_keys_report_event() is gettign called from probe for
    initialing the key state. This function should bypass if it is not the
    gpio based otherwise system crash.
    I made following change and after that it works fine.

    static void gpio_keys_report_event(struct gpio_button_data *bdata)
    const struct gpio_keys_button *button = bdata->button;
    struct input_dev *input = bdata->input;
    unsigned int type = button->type ?: EV_KEY;
    int state;

    if (!gpio_is_valid(button->gpio))

    state = (gpio_get_value_cansleep(button->gpio) ? 1 : 0) ^

     \ /
      Last update: 2012-03-19 08:33    [W:0.020 / U:16.336 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site