aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/hid/hid-sony.c
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2016-07-21 19:54:48 +0300
committerJiri Kosina <jkosina@suse.cz>2016-08-02 16:43:05 +0200
commit4ba1eeeb609f93f904dadf5e304345ea10fb543a (patch)
treecbc53f61e462c69a997877a1784ec138eb564ee7 /drivers/hid/hid-sony.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid (diff)
downloadwireguard-linux-4ba1eeeb609f93f904dadf5e304345ea10fb543a.tar.xz
wireguard-linux-4ba1eeeb609f93f904dadf5e304345ea10fb543a.zip
HID: sony: disable descriptor fixup for FutureMax Dance Mat
The FutureMax Dance Mat claims to be a SixAxis controller but breaks if descriptor fixups are applied. Detect the device using its USB product string and disable fixups when it is detected. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-sony.c')
-rw-r--r--drivers/hid/hid-sony.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 310436a54a3f..29a1aa90c294 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -51,6 +51,7 @@
#define NAVIGATION_CONTROLLER_USB BIT(9)
#define NAVIGATION_CONTROLLER_BT BIT(10)
#define SINO_LITE_CONTROLLER BIT(11)
+#define FUTUREMAX_DANCE_MAT BIT(12)
#define SIXAXIS_CONTROLLER (SIXAXIS_CONTROLLER_USB | SIXAXIS_CONTROLLER_BT)
#define MOTION_CONTROLLER (MOTION_CONTROLLER_USB | MOTION_CONTROLLER_BT)
@@ -1125,7 +1126,7 @@ static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc,
{
struct sony_sc *sc = hid_get_drvdata(hdev);
- if (sc->quirks & SINO_LITE_CONTROLLER)
+ if (sc->quirks & (SINO_LITE_CONTROLLER | FUTUREMAX_DANCE_MAT))
return rdesc;
/*
@@ -2289,6 +2290,9 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
struct sony_sc *sc;
unsigned int connect_mask = HID_CONNECT_DEFAULT;
+ if (!strcmp(hdev->name, "FutureMax Dance Mat"))
+ quirks |= FUTUREMAX_DANCE_MAT;
+
sc = devm_kzalloc(&hdev->dev, sizeof(*sc), GFP_KERNEL);
if (sc == NULL) {
hid_err(hdev, "can't alloc sony descriptor\n");