]> asedeno.scripts.mit.edu Git - linux.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)
commit55a07d62db0feda2e37f6962a1b2799e2a8b42ba
treea42a90e65aeb0c0f8ef2a2f9329f8dcb75e9d03e
parent227c011b2e046dd4d36d9e00e3d9c88097b2a4c3
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