diff options
author | Mikko Perttunen <mperttunen@nvidia.com> | 2016-07-21 12:54:48 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2016-08-02 10:43:05 -0400 |
commit | 4ba1eeeb609f93f904dadf5e304345ea10fb543a (patch) | |
tree | cbc53f61e462c69a997877a1784ec138eb564ee7 | |
parent | 884316deb4c9fdf9becfa31831a9e40717e3026c (diff) |
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>
-rw-r--r-- | drivers/hid/hid-sony.c | 6 |
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 @@ | |||
51 | #define NAVIGATION_CONTROLLER_USB BIT(9) | 51 | #define NAVIGATION_CONTROLLER_USB BIT(9) |
52 | #define NAVIGATION_CONTROLLER_BT BIT(10) | 52 | #define NAVIGATION_CONTROLLER_BT BIT(10) |
53 | #define SINO_LITE_CONTROLLER BIT(11) | 53 | #define SINO_LITE_CONTROLLER BIT(11) |
54 | #define FUTUREMAX_DANCE_MAT BIT(12) | ||
54 | 55 | ||
55 | #define SIXAXIS_CONTROLLER (SIXAXIS_CONTROLLER_USB | SIXAXIS_CONTROLLER_BT) | 56 | #define SIXAXIS_CONTROLLER (SIXAXIS_CONTROLLER_USB | SIXAXIS_CONTROLLER_BT) |
56 | #define MOTION_CONTROLLER (MOTION_CONTROLLER_USB | MOTION_CONTROLLER_BT) | 57 | #define MOTION_CONTROLLER (MOTION_CONTROLLER_USB | MOTION_CONTROLLER_BT) |
@@ -1125,7 +1126,7 @@ static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc, | |||
1125 | { | 1126 | { |
1126 | struct sony_sc *sc = hid_get_drvdata(hdev); | 1127 | struct sony_sc *sc = hid_get_drvdata(hdev); |
1127 | 1128 | ||
1128 | if (sc->quirks & SINO_LITE_CONTROLLER) | 1129 | if (sc->quirks & (SINO_LITE_CONTROLLER | FUTUREMAX_DANCE_MAT)) |
1129 | return rdesc; | 1130 | return rdesc; |
1130 | 1131 | ||
1131 | /* | 1132 | /* |
@@ -2289,6 +2290,9 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
2289 | struct sony_sc *sc; | 2290 | struct sony_sc *sc; |
2290 | unsigned int connect_mask = HID_CONNECT_DEFAULT; | 2291 | unsigned int connect_mask = HID_CONNECT_DEFAULT; |
2291 | 2292 | ||
2293 | if (!strcmp(hdev->name, "FutureMax Dance Mat")) | ||
2294 | quirks |= FUTUREMAX_DANCE_MAT; | ||
2295 | |||
2292 | sc = devm_kzalloc(&hdev->dev, sizeof(*sc), GFP_KERNEL); | 2296 | sc = devm_kzalloc(&hdev->dev, sizeof(*sc), GFP_KERNEL); |
2293 | if (sc == NULL) { | 2297 | if (sc == NULL) { |
2294 | hid_err(hdev, "can't alloc sony descriptor\n"); | 2298 | hid_err(hdev, "can't alloc sony descriptor\n"); |