From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC388C433E0 for ; Sun, 28 Feb 2021 01:34:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6EE2764E24 for ; Sun, 28 Feb 2021 01:34:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EE2764E24 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C98B46B008A; Sat, 27 Feb 2021 20:34:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C49016B0092; Sat, 27 Feb 2021 20:34:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B3A258D0019; Sat, 27 Feb 2021 20:34:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0062.hostedemail.com [216.40.44.62]) by kanga.kvack.org (Postfix) with ESMTP id 9D6046B008A for ; Sat, 27 Feb 2021 20:34:15 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 589D352CB for ; Sun, 28 Feb 2021 01:34:15 +0000 (UTC) X-FDA: 77865956070.23.ABCCC4B Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) by imf26.hostedemail.com (Postfix) with ESMTP id 9777C407F8ED for ; Sun, 28 Feb 2021 01:34:09 +0000 (UTC) Received: by mail-oi1-f182.google.com with SMTP id h17so14232657oih.5 for ; Sat, 27 Feb 2021 17:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9boI14QwAlu2PcXuymg1QkXuG474SaB7CiYYGhNgj2c=; b=tvh7xqhUgz5mQDAogLiBbjs+YzStEV/wbzTtZIzF5ik5+ippftlk4dFoOs1Zf764Yy tXn7BCCbBSALRyuy2zHQ8vb6/JDtfreeCriGkqtQmlsozAOPVm8u39ZFHGzAGqhJhl4e TW4JDddwssvUIwQunCvbuydCuKaY8+iBg2QHcI5SQ0J/Oiz2cmtnhqEO7pas/G3DfRqQ rKFuhSI8xsKTJjF/R47iXnCNXLg2T6MaZG9DO+HCnBlhqCvRvDiAfUa7wpVyfpBmS37I 7spV80R6g/oVeMeVMVs1YJGH0ikfXw0CQvstuJIfEFdttXNDQZXOczDiuDQpM6b2Bz9S +3Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9boI14QwAlu2PcXuymg1QkXuG474SaB7CiYYGhNgj2c=; b=CgFU0ZYpwMJKXR4pHRvNHvYMPxhQrBcHmQ+EA4ExqZmBC0XlWG2J0sa0kXR/O5dEfM aPS8/VjnqFxiPHR9M1BDHOSniN3MjdQIJHmYKHAQYPCbaqvAElkH6NZLLo2OoQBjsgtu I6u5/aiW0igBS3uYj7DsgTne128kiR9CE1w+Vi2XpcZHAoDsfz68vOpAob7+qDZNwLgi SgzCY3AOGOcpq5TFur5V86uEYGZnuIFUtrLJW3Fc8cR/SvmXmDfGvGR6AUfA8ku3l73V kal3HJMd0kuuKCC49dpu9evVVPEQMHDvB+VmizyQiS19WZ8r9MVq23CufKty4YWXLtpT 76zg== X-Gm-Message-State: AOAM532hT0NnDi9aVB95hecPPkPaMCIxX6rKpHVoqrWW0vA7XVFKykI/ HWLj1DHpNNylxoQOXmS/4gA= X-Google-Smtp-Source: ABdhPJx/BXgyuYJLEHx+k84HgcbxKogu1POk7ibcSCIf0vWQ7tjH6vjDmGlzN0u9r8SXX2sQT1bB+g== X-Received: by 2002:a05:6808:bd2:: with SMTP id o18mr6764307oik.7.1614476053955; Sat, 27 Feb 2021 17:34:13 -0800 (PST) Received: from [192.168.35.124] ([69.149.214.238]) by smtp.gmail.com with ESMTPSA id h11sm2639233ooj.36.2021.02.27.17.34.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Feb 2021 17:34:12 -0800 (PST) Subject: Re: [PATCH] Input: Add "Share" button to Microsoft Xbox One controller. To: Dmitry Torokhov , Chris Ye Cc: Chris Ye , linux-mm@kvack.org, linux-kernel@vger.kernel.org, trivial@kernel.org, kernel-team@android.com References: <20210225040032.684590-1-lzye@google.com> From: Cameron Gutman Message-ID: <7f35325d-efa4-4546-bfc7-7d2532cc25e1@gmail.com> Date: Sat, 27 Feb 2021 19:34:12 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 9777C407F8ED X-Stat-Signature: hswt5dhi3w15mmtezz9p5kyhosgjcnxh Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf26; identity=mailfrom; envelope-from=""; helo=mail-oi1-f182.google.com; client-ip=209.85.167.182 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614476049-999866 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 >> 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 >>>> --- >>>> 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 >