]> git.baikalelectronics.ru Git - kernel.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)
commitc489ac6251aa8c8cc07553476188ef7f9938f014
tree7ed7d966a6ae043dfdf7338feb525f70d9437eac
parent98f0a2036b0233ccec8e70d0fd55cb689bbbc07f
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