]> asedeno.scripts.mit.edu Git - linux.git/commit
HID: sony: Make DS4 bt poll interval adjustable
authorRoderick Colenbrander <roderick.colenbrander@sony.com>
Fri, 24 Mar 2017 22:17:49 +0000 (15:17 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 6 Apr 2017 12:41:17 +0000 (14:41 +0200)
commit77b499e739ed5561e5026fa7140ae53f6c4d1d8e
tree7ed7d966a6ae043dfdf7338feb525f70d9437eac
parent5caceb0695d0498b8c931cbc3cdafd99bd37b8ae
HID: sony: Make DS4 bt poll interval adjustable

By default when using bluetooth the DS4 reports data at about 1kHz,
which is quite fast especially on weak devices. We now make the
device use the USB poll interval, which is a fixed 4ms. In addition
we make the value adjustable through sysfs.

The error handling in sony_input_configured is a little tricky. It
is not easy to add other goto's as not all codepaths have logic
for adding this attribute. Luckily we are setting the value for the
attribute to a default value, so we can use that to detect if we need
to remove the file.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c