HID: sony: Support motion sensor calibration on dongle
authorRoderick Colenbrander <roderick.colenbrander@sony.com>
Tue, 7 Mar 2017 23:45:06 +0000 (15:45 -0800)
committerJiri Kosina <jkosina@suse.cz>
Tue, 21 Mar 2017 14:11:56 +0000 (15:11 +0100)
commitf2f47c385d2babf44cbd2ec2be4f2b29b88041bc
tree0c5017bdf76ae445cecca101764d7772d14cedaf
parentb53227360dc2e30fb8809815dfdc39339a34b8dd
HID: sony: Support motion sensor calibration on dongle

The DualShock 4 dongle isn't connected to a real DualShock 4 at
time of driver loading. When a DualShock 4 is plugged in, we
need to obtain calibration data (the dongle would have zeros).

This patch adds calibration logic, which we schedule on a hotplug
from sony_raw_event. In addition this patch adds dongle state
handling.

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