From: Bastien Nocera <hadess@hadess.net>
To: linux-bluetooth@vger.kernel.org
Cc: Bastien Nocera <hadess@hadess.net>
Subject: [PATCH v2 09/11] profiles/input: Add support for detecting PS3 Keypads
Date: Wed, 18 Oct 2017 03:58:13 +0200 [thread overview]
Message-ID: <20171018015815.10045-9-hadess@hadess.net> (raw)
In-Reply-To: <20171018015815.10045-1-hadess@hadess.net>
Add device information about the PS3 wireless keypads and consider those
as "sixaxis" devices.
---
profiles/input/server.c | 3 ++-
profiles/input/sixaxis.h | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/profiles/input/server.c b/profiles/input/server.c
index ef428fefe..41d7b3ccf 100644
--- a/profiles/input/server.c
+++ b/profiles/input/server.c
@@ -135,7 +135,8 @@ static bool dev_is_sixaxis(const bdaddr_t *src, const bdaddr_t *dst)
type = get_pairing_type(vid, pid, NULL, NULL, NULL);
if (type == CABLE_PAIRING_SIXAXIS ||
- type == CABLE_PAIRING_DS4)
+ type == CABLE_PAIRING_DS4 ||
+ type == CABLE_PAIRING_PS3_WIRELESS_KEYPAD)
return true;
return false;
diff --git a/profiles/input/sixaxis.h b/profiles/input/sixaxis.h
index 17a7dc3f7..497a3f2a5 100644
--- a/profiles/input/sixaxis.h
+++ b/profiles/input/sixaxis.h
@@ -30,6 +30,7 @@ typedef enum {
CABLE_PAIRING_UNSUPPORTED = 0,
CABLE_PAIRING_SIXAXIS,
CABLE_PAIRING_DS4,
+ CABLE_PAIRING_PS3_WIRELESS_KEYPAD
} CablePairingType;
static inline CablePairingType get_pairing_type(uint16_t vid,
@@ -78,6 +79,14 @@ static inline CablePairingType get_pairing_type(uint16_t vid,
.version = 0x0001,
.type = CABLE_PAIRING_DS4,
},
+ {
+ .name = "Wireless Keypad",
+ .source = 0x0002,
+ .vid = 0x054c,
+ .pid = 0x03a0,
+ .version = 0x0001,
+ .type = CABLE_PAIRING_PS3_WIRELESS_KEYPAD
+ },
};
guint i;
--
2.14.2
next prev parent reply other threads:[~2017-10-18 1:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 1:58 [PATCH v2 01/11] adapter: Add btd_request_authorization_cable_configured() Bastien Nocera
2017-10-18 1:58 ` [PATCH v2 02/11] sixaxis: Ask user whether cable configuration should be allowed Bastien Nocera
2017-10-18 1:58 ` [PATCH v2 03/11] plugins/sixaxis: Move device discovery to shared header Bastien Nocera
2017-10-18 1:58 ` [PATCH v2 04/11] profiles/input: Use sixaxis header to simplify device detection Bastien Nocera
2017-10-18 1:58 ` [PATCH v2 05/11] profiles/input: Add DS4 devices to the shared header Bastien Nocera
2017-10-18 1:58 ` [PATCH v2 06/11] plugins/sixaxis: Rename sixaxis specific functions Bastien Nocera
2017-10-18 1:58 ` [PATCH v2 07/11] plugins/sixaxis: Add support for DualShock 4/PS4 cable pairing Bastien Nocera
2017-10-18 1:58 ` [PATCH v2 08/11] plugins/sixaxis: Cancel cable pairing if unplugged Bastien Nocera
2017-10-18 1:58 ` Bastien Nocera [this message]
2017-10-18 1:58 ` [PATCH v2 10/11] plugins/sixaxis: Add cable pairing for PS3 Keypads Bastien Nocera
2017-10-18 1:58 ` [PATCH v2 11/11] plugins/autopair: Don't try to pair PS3 Keypad Bastien Nocera
2017-10-27 8:00 ` [PATCH v2 01/11] adapter: Add btd_request_authorization_cable_configured() Szymon Janc
2017-10-27 11:34 ` Bastien Nocera
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=20171018015815.10045-9-hadess@hadess.net \
--to=hadess@hadess.net \
--cc=linux-bluetooth@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).