Skip to content
Commit 027c71bb authored by Petri Gynther's avatar Petri Gynther Committed by Dmitry Torokhov
Browse files

Input: improve autorepeat initialization



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>
parent aba54876
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment