]> git.baikalelectronics.ru Git - kernel.git/commit
HID: sony: Relax duplicate checking for USB-only devices
authorFrank Praznik <frank.praznik@gmail.com>
Fri, 23 Sep 2016 00:18:08 +0000 (20:18 -0400)
committerJiri Kosina <jkosina@suse.cz>
Mon, 26 Sep 2016 13:32:47 +0000 (15:32 +0200)
commiteab1ff23a1c74651cd57ccb6e56ab3be9e622922
tree42072fd692ed5f162db242a7e5f30e9ee45b76ca
parent2438ebb7242a2353b2cc9d462e8d6a6cd0ea9488
HID: sony: Relax duplicate checking for USB-only devices

Some USB-only devices which masquerade as Sixaxis controllers report the
same generic Bluetooth address for all hardware when queried via the HID
report. This causes these devices to be wrongly rejected as duplicates
when more than one is connected at once.

This introduces a connection type comparison when checking for duplicates
and only rejects the newly connected device if the existing matching
device is connected using a different connection protocol.

The results of the connection type comparison are also used when
registering power supply info as the device Bluetooth address is used
as the unique identifier string.  In cases where more than one valid
device has the same Bluetooth address the device ID is now appended
to the power supply name string to avoid name collisions when
registering the power supply information.

Signed-off-by: Frank Praznik <frank.praznik@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c