]> git.baikalelectronics.ru Git - kernel.git/commit
HID: sony: Calibrate DS4 motion sensors
authorRoderick Colenbrander <roderick.colenbrander@sony.com>
Tue, 7 Mar 2017 23:45:01 +0000 (15:45 -0800)
committerJiri Kosina <jkosina@suse.cz>
Tue, 21 Mar 2017 14:11:55 +0000 (15:11 +0100)
commit82f9152a078d42e1faf27997a39efbf352896855
treea42a90e65aeb0c0f8ef2a2f9329f8dcb75e9d03e
parent665c04e6825d3a06c11596de2720ca39ae0b2a8f
HID: sony: Calibrate DS4 motion sensors

The DS4 motion sensors require calibration for accurate operation.
This patch adds calibration for both the accelerometer and the
gyroscope. Calibration requires reading device specific scaling
factors and offsets. For precision reasons we store these values
as a numerator and denominator and apply the values when processing
the data.

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