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=-12.8 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,SPF_HELO_NONE,SPF_PASS 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 98AC0C433DB for ; Thu, 25 Feb 2021 06:26:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CFC8A64EC8 for ; Thu, 25 Feb 2021 06:26:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFC8A64EC8 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 D291F6B0006; Thu, 25 Feb 2021 01:26:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CD8C76B006C; Thu, 25 Feb 2021 01:26:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BEEA26B006E; Thu, 25 Feb 2021 01:26:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0082.hostedemail.com [216.40.44.82]) by kanga.kvack.org (Postfix) with ESMTP id AA78A6B0006 for ; Thu, 25 Feb 2021 01:26:34 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 71280AF73 for ; Thu, 25 Feb 2021 06:26:34 +0000 (UTC) X-FDA: 77855806308.05.5037BE9 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by imf02.hostedemail.com (Postfix) with ESMTP id 5D616407F8DC for ; Thu, 25 Feb 2021 06:26:20 +0000 (UTC) Received: by mail-pl1-f169.google.com with SMTP id d16so2662092plg.0 for ; Wed, 24 Feb 2021 22:26:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hGA9u86pgJ/h+4ARie57RSKx/4zZugYIPz84nY+12w8=; b=r7RwTThHs5yeyOptz2vk37ZktRyKG3WRN/vYFJEcKVD+DLh+GZgH/kpij7Oiyigodf ZPbRh/7aPYvNM8ENbgPofp35wG5FHCNdj6PRno3LpSIkBjqYAyYZUHzpn3LXKq0wFDqD b3SU4+sgyiTGTjzEUCb3N9CSF16YcyZhb2cCHsF9VqZSpAQU3JCPApXuMyd0ruHusOvu 65O1V8xKHw2XVwkipbLAxh2v49lOx0Dka666U6pWJPWFtWj7c7N5gHjnaQch8f58A8uo o4H0UXxvZqT0Q4Tclm7cQH+pRWerVmiAh7ARCbIE3ncTXcIrXRdwMhyn3NU6dHz9pqCQ gWAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hGA9u86pgJ/h+4ARie57RSKx/4zZugYIPz84nY+12w8=; b=Dwc47F9XLzY2hikCdAU732b+b3aiklPMGHVWOViI0BdsdVLAZ3OGDtaOG8EM8LEnGg PpeCtN3/od3SqjyAn2+MPGx3hlTCkwlChOcdeaJf0Hhu7sCBgEaaiDRF2D4sMH+hWODJ WnYJol6Ql60NiJCH1dEB83qcuE64I8V6P9yxVlP/OVeDT1OK5Lnu3AvoPsoCnDAuDe9p 7iYoB1dq10Be6ksqvQGki3Xww6iJLEdrNXQFQIG7WESw5FwQI2JbO6uiJuidvBGiJm9J RUCXDuDLb8fIouItqutPG8hWj0g1AnURjUeXaUXBTHg7o3p2RVIdvCjZ2FXfXbKYjU58 I+Tg== X-Gm-Message-State: AOAM530kI1sQ0hDkv6NbTfkpFdJ+9XJXvW+gYCe0M35ulqrTmtzrDPUE geGXAk6r/yGoFSde66wPd2M= X-Google-Smtp-Source: ABdhPJzYRSM3iTmqYW9vck+GGHcfjUmiktS6Bh+PDQ4Hi2+R52jeFd9eQJ6EDHKoAi50EIFjdq9MBQ== X-Received: by 2002:a17:90a:c386:: with SMTP id h6mr1784727pjt.145.1614234393002; Wed, 24 Feb 2021 22:26:33 -0800 (PST) Received: from google.com ([2620:15c:202:201:552:720f:2933:5745]) by smtp.gmail.com with ESMTPSA id r2sm4599521pgv.50.2021.02.24.22.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 22:26:32 -0800 (PST) Date: Wed, 24 Feb 2021 22:26:29 -0800 From: Dmitry Torokhov To: Chris Ye , Cameron Gutman Cc: Chris Ye , 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. Message-ID: References: <20210225040032.684590-1-lzye@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: 78rpcuet8kun3iibcweu17gpqeiiqjxp X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 5D616407F8DC Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf02; identity=mailfrom; envelope-from=""; helo=mail-pl1-f169.google.com; client-ip=209.85.214.169 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614234380-958435 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 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? > 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. > > 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 -- Dmitry