From: Cameron Gutman <aicommander@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, Chris Ye <lzye@google.com>
Cc: Chris Ye <linzhao.ye@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
trivial@kernel.org, kernel-team@android.com
Subject: Re: [PATCH] Input: Add "Share" button to Microsoft Xbox One controller.
Date: Sat, 27 Feb 2021 19:34:12 -0600 [thread overview]
Message-ID: <7f35325d-efa4-4546-bfc7-7d2532cc25e1@gmail.com> (raw)
In-Reply-To: <YDdDFfMFFbuqvL43@google.com>
On 2/25/21 12:26 AM, Dmitry Torokhov wrote:
> On Wed, Feb 24, 2021 at 08:44:37PM -0800, Chris Ye wrote:
>> Hi Dmitry,
>> The latest Xbox One X series has this button, I can add a new
>> XTYPE_XBOXONE_X and only apply the change to the new type.
>
> Sounds good to me. Cameron, what do you think?
>
I'm not sure if some wires got crossed, but I see v2 uses MAP_SHARE_BUTTON
rather than a new XTYPE. I'm fine with either.
>> The controller supports bluetooth and the HID usage for this button is
>> consumer 0xB2:
>> 0x05, 0x0C, // Usage Page (Consumer)
>> 0x0A, 0xB2, 0x00, // Usage (Record)
>
> I see, thank you.
>
Regards,
Cameron
>>
>> Thanks!
>> Chris
>>
>> On Wed, Feb 24, 2021 at 8:33 PM Dmitry Torokhov
>> <dmitry.torokhov@gmail.com> wrote:
>>>
>>> Hi Chris,
>>>
>>> On Thu, Feb 25, 2021 at 04:00:32AM +0000, Chris Ye wrote:
>>>> Add "Share" button input capability and input event mapping for
>>>> Microsoft Xbox One controller.
>>>> Fixed Microsoft Xbox One controller share button not working under USB
>>>> connection.
>>>>
>>>> Signed-off-by: Chris Ye <lzye@google.com>
>>>> ---
>>>> drivers/input/joystick/xpad.c | 16 ++++++++++++++--
>>>> 1 file changed, 14 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
>>>> index 9f0d07dcbf06..08c3e93ccb2f 100644
>>>> --- a/drivers/input/joystick/xpad.c
>>>> +++ b/drivers/input/joystick/xpad.c
>>>> @@ -368,6 +368,14 @@ static const signed short xpad360_btn[] = { /* buttons for x360 controller */
>>>> -1
>>>> };
>>>>
>>>> +static const signed short xpad_xboxone_btn[] = {
>>>> + /* buttons for xbox one controller */
>>>> + BTN_TL, BTN_TR, /* Button LB/RB */
>>>> + BTN_MODE, /* The big X button */
>>>> + KEY_RECORD, /* The share button */
>>>
>>> If I understand this correctly, not all Xbox One controllers have this
>>> new key. Is it possible to determine if it is present and only set
>>> capability for controllers that actually have it?
>>>
>>> Also, I am unsure if KEY_RECORD is the best keycode for this. It might,
>>> but does your controller supports bluetooth? What HID usage code does it
>>> send for this key?
>>>
>>> Thanks.
>>>
>>> --
>>> Dmitry
>
prev parent reply other threads:[~2021-02-28 1:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 4:00 Chris Ye
2021-02-25 4:32 ` Dmitry Torokhov
2021-02-25 4:44 ` Chris Ye
2021-02-25 6:26 ` Dmitry Torokhov
2021-02-28 1:34 ` Cameron Gutman [this message]
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=7f35325d-efa4-4546-bfc7-7d2532cc25e1@gmail.com \
--to=aicommander@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linzhao.ye@gmail.com \
--cc=lzye@google.com \
--cc=trivial@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