From: Frank Praznik <frank.praznik@oh.rr.com>
To: linux-input@vger.kernel.org
Cc: jkosina@suse.cz, Frank Praznik <frank.praznik@oh.rr.com>
Subject: [PATCH v3 2/8] HID: sony: Set the quriks flag for Bluetooth controllers
Date: Sat, 15 Mar 2014 09:41:16 -0400 [thread overview]
Message-ID: <1394890882-2039-3-git-send-email-frank.praznik@oh.rr.com> (raw)
In-Reply-To: <1394890882-2039-1-git-send-email-frank.praznik@oh.rr.com>
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>
---
drivers/hid/hid-sony.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 4c445a0..908de27 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1632,11 +1632,21 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
sc->worker_initialized = 1;
INIT_WORK(&sc->state_worker, sixaxis_state_worker);
} else if (sc->quirks & SIXAXIS_CONTROLLER_BT) {
+ /*
+ * The Sixaxis wants output reports sent on the ctrl endpoint
+ * when connected via Bluetooth.
+ */
+ hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP;
ret = sixaxis_set_operational_bt(hdev);
sc->worker_initialized = 1;
INIT_WORK(&sc->state_worker, sixaxis_state_worker);
} else if (sc->quirks & DUALSHOCK4_CONTROLLER) {
if (sc->quirks & DUALSHOCK4_CONTROLLER_BT) {
+ /*
+ * The DualShock 4 wants output reports sent on the ctrl
+ * endpoint when connected via Bluetooth.
+ */
+ hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP;
ret = dualshock4_set_operational_bt(hdev);
if (ret < 0) {
hid_err(hdev, "failed to set the Dualshock 4 operational mode\n");
--
1.8.5.3
next prev parent reply other threads:[~2014-03-15 13:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-15 13:41 [PATCH v3 0/8] HID: sony: More Sony controller fixes and improvements Frank Praznik
2014-03-15 13:41 ` [PATCH v3 1/8] HID: sony: Fix Sixaxis cable state detection Frank Praznik
2014-03-15 13:41 ` Frank Praznik [this message]
2014-03-31 19:14 ` [PATCH v3 2/8] HID: sony: Set the quriks flag for Bluetooth controllers andrea
2014-03-15 13:41 ` [PATCH v3 3/8] HID: sony: Use inliners for work queue initialization and cancellation Frank Praznik
2014-03-15 13:41 ` [PATCH v3 4/8] HID: sony: Use a struct for the Sixaxis output report Frank Praznik
2014-03-15 13:41 ` [PATCH v3 5/8] HID: sony: Convert startup and shutdown functions to use a uniform parameter type Frank Praznik
2014-03-15 13:41 ` [PATCH v3 6/8] HID: sony: Use the controller Bluetooth MAC address as the unique value in the battery name string Frank Praznik
2014-03-15 13:41 ` [PATCH v3 7/8] HID: sony: Initialize the controller LEDs with a device ID value Frank Praznik
2014-03-15 13:41 ` [PATCH v3 8/8] HID: sony: Add blink support to the Sixaxis and DualShock 4 LEDs Frank Praznik
2014-03-27 14:27 ` [PATCH v3 0/8] HID: sony: More Sony controller fixes and improvements Frank Praznik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394890882-2039-3-git-send-email-frank.praznik@oh.rr.com \
--to=frank.praznik@oh.rr.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).