Skip to content
  • Petri Gynther's avatar
    Input: improve autorepeat initialization · 027c71bb
    Petri Gynther authored
    
    
    Add new function input_enable_softrepeat() that allows drivers to
    initialize their own values for input_dev->rep[REP_DELAY] and
    input_dev->rep[REP_PERIOD], but also use the software autorepeat
    functionality from input.c.
    
    For example, a HID driver could do:
    
    static void xyz_input_configured(struct hid_device *hid,
                                     struct hid_input *hidinput)
    {
            input_enable_softrepeat(hidinput->input, 400, 100);
    }
    
    static struct hid_driver xyz_driver = {
            .input_configured = xyz_input_configured,
    }
    
    Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    027c71bb