aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Praznik <frank.praznik@gmail.com>2016-09-22 20:18:10 -0400
committerJiri Kosina <jkosina@suse.cz>2016-09-26 09:32:48 -0400
commitc4425c8f26aad2b49c5959fad277c9d109fb8ca3 (patch)
tree849a14590c10d05fd3adaf4bbf47c6d639121994
parent2a2429327711558aa23fd73d770b6fd5e0d10de7 (diff)
HID: sony: Update copyright and add Dualshock 4 rate control note
Update the copyright notice with the current year and add a note about values for controlling the Dualshock 4 reporting rate. Processing reports at the default full rate of 1000hz can be too demanding for some low-power embedded processors so noting alternate values for people working with this hardware can be useful. Thanks to Rostislav Pehlivanov for finding these values. Signed-off-by: Frank Praznik <frank.praznik@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/hid-sony.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 9b96f9570531..9bf4e3637ba2 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -8,7 +8,7 @@
8 * Copyright (c) 2012 David Dillow <dave@thedillows.org> 8 * Copyright (c) 2012 David Dillow <dave@thedillows.org>
9 * Copyright (c) 2006-2013 Jiri Kosina 9 * Copyright (c) 2006-2013 Jiri Kosina
10 * Copyright (c) 2013 Colin Leitner <colin.leitner@gmail.com> 10 * Copyright (c) 2013 Colin Leitner <colin.leitner@gmail.com>
11 * Copyright (c) 2014 Frank Praznik <frank.praznik@gmail.com> 11 * Copyright (c) 2014-2016 Frank Praznik <frank.praznik@gmail.com>
12 */ 12 */
13 13
14/* 14/*
@@ -1879,6 +1879,17 @@ static void dualshock4_send_output_report(struct sony_sc *sc)
1879 u8 *buf = sc->output_report_dmabuf; 1879 u8 *buf = sc->output_report_dmabuf;
1880 int offset; 1880 int offset;
1881 1881
1882 /*
1883 * NOTE: The buf[1] field of the Bluetooth report controls
1884 * the Dualshock 4 reporting rate.
1885 *
1886 * Known values include:
1887 *
1888 * 0x80 - 1000hz (full speed)
1889 * 0xA0 - 31hz
1890 * 0xB0 - 20hz
1891 * 0xD0 - 66hz
1892 */
1882 if (sc->quirks & DUALSHOCK4_CONTROLLER_USB) { 1893 if (sc->quirks & DUALSHOCK4_CONTROLLER_USB) {
1883 memset(buf, 0, DS4_REPORT_0x05_SIZE); 1894 memset(buf, 0, DS4_REPORT_0x05_SIZE);
1884 buf[0] = 0x05; 1895 buf[0] = 0x05;