aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-sony.c
diff options
context:
space:
mode:
authorFrank Praznik <frank.praznik@oh.rr.com>2014-03-15 09:41:16 -0400
committerJiri Kosina <jkosina@suse.cz>2014-04-01 12:44:06 -0400
commit2078b9bb240ea31ff3ea715881d1ec03d83e6de4 (patch)
tree27ff9dca6d1e9e7d2a837bc0997089df18270ff2 /drivers/hid/hid-sony.c
parent914c578391c7cf55d88e2a553208e7523d0ddf1a (diff)
HID: sony: Set the quriks flag for Bluetooth controllers
The Sixaxis and DualShock 4 want HID output reports sent on the control endpoint when connected via Bluetooth. Set the HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP flag for these devices so hidraw write() works properly. Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-sony.c')
-rw-r--r--drivers/hid/hid-sony.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 31ba01a39e81..c364be158ae6 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1664,11 +1664,21 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
1664 sc->worker_initialized = 1; 1664 sc->worker_initialized = 1;
1665 INIT_WORK(&sc->state_worker, sixaxis_state_worker); 1665 INIT_WORK(&sc->state_worker, sixaxis_state_worker);
1666 } else if (sc->quirks & SIXAXIS_CONTROLLER_BT) { 1666 } else if (sc->quirks & SIXAXIS_CONTROLLER_BT) {
1667 /*
1668 * The Sixaxis wants output reports sent on the ctrl endpoint
1669 * when connected via Bluetooth.
1670 */
1671 hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP;
1667 ret = sixaxis_set_operational_bt(hdev); 1672 ret = sixaxis_set_operational_bt(hdev);
1668 sc->worker_initialized = 1; 1673 sc->worker_initialized = 1;
1669 INIT_WORK(&sc->state_worker, sixaxis_state_worker); 1674 INIT_WORK(&sc->state_worker, sixaxis_state_worker);
1670 } else if (sc->quirks & DUALSHOCK4_CONTROLLER) { 1675 } else if (sc->quirks & DUALSHOCK4_CONTROLLER) {
1671 if (sc->quirks & DUALSHOCK4_CONTROLLER_BT) { 1676 if (sc->quirks & DUALSHOCK4_CONTROLLER_BT) {
1677 /*
1678 * The DualShock 4 wants output reports sent on the ctrl
1679 * endpoint when connected via Bluetooth.
1680 */
1681 hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP;
1672 ret = dualshock4_set_operational_bt(hdev); 1682 ret = dualshock4_set_operational_bt(hdev);
1673 if (ret < 0) { 1683 if (ret < 0) {
1674 hid_err(hdev, "failed to set the Dualshock 4 operational mode\n"); 1684 hid_err(hdev, "failed to set the Dualshock 4 operational mode\n");