From 7051df8025064869d067acc9b503894ee3c9167e Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Fri, 5 Sep 2014 13:42:42 -0500 Subject: [PATCH] Updated patch for 3.1.6.1 kernel driver Signed-off-by: Matt DeVillier --- ..._sony-add_autorepeat_for_PS3_remotes.patch | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 packages/linux/patches/3.16.1/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch diff --git a/packages/linux/patches/3.16.1/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch b/packages/linux/patches/3.16.1/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch new file mode 100644 index 0000000000..7a1499b1f7 --- /dev/null +++ b/packages/linux/patches/3.16.1/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch @@ -0,0 +1,69 @@ +From 7051422474e4c4e302ede3d07ffd8ef2682e07a2 Mon Sep 17 00:00:00 2001 +From: Stefan Saraev +Date: Tue, 22 Apr 2014 16:05:14 +0300 +Subject: [PATCH] [RFC] hid/sony: add autorepeat for PS3 remotes + +adapted to 3.16 + +Betreff: [RFC] hid/sony: add autorepeat for PS3 remotes +Von: David Dillow +Datum: 28.06.2013 04:28 +An: linux-input@vger.kernel.org +Kopie (CC): Stephan Raue + +Some applications using the PS3 remote would like to have autorepeat +from the device. Use the input subsystem's software emulation to provide +this capability, and enable those that don't need it to turn it off. +--- +I'm not sure this is the correct approach, or if it is even appropriate +for a remote to do autorepeat. However, the media/rc subsystem does do +it by default, and it's been requested by users, so there is at least +some demand. + +This compiled against the hid-sony driver with the PS3 remote changes +merged, but I have done no testing of it. If the approach seems +reasonable, I'll try to test it when the MythTV is idle. +--- + 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 +