Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- drivers/hid/hid-sony.c | 20 ++++++++++++++++++++
- 1 files changed, 20 insertions(+), 0 deletions(-)
- diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
- --- a/drivers/hid/hid-sony.c
- +++ b/drivers/hid/hid-sony.c
- @@ -819,6 +819,24 @@ static int ps3remote_mapping(struct hid_
- return 1;
- }
- +static int ps3remote_setup_repeat(struct hid_device *hdev)
- +{
- + struct hid_input *hidinput = list_first_entry(&hdev->inputs,
- + struct hid_input, list);
- + struct input_dev *input = hidinput->input;
- +
- + /*
- + * Set up autorepeat defaults per the remote control subsystem;
- + * this must be done after hid_hw_start(), as having these non-zero
- + * at the time of input_register_device() tells the input system that
- + * the hardware does the autorepeat, and the PS3 remote does not.
- + */
- + set_bit(EV_REP, input->evbit);
- + input->rep[REP_DELAY] = 500;
- + input->rep[REP_PERIOD] = 125;
- +
- + return 0;
- +}
- /* Sony Vaio VGX has wrongly mouse pointer declared as constant */
- static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc,
- @@ -1892,6 +1910,8 @@ static int sony_probe(struct hid_device
- goto err_stop;
- sony_init_work(sc, dualshock4_state_worker);
- + } else if (sc->quirks & PS3REMOTE) {
- + ret = ps3remote_setup_repeat(hdev);
- } else {
- ret = 0;
- }
- --
- 1.7.2.5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement