From: Bastien Nocera <hadess@hadess.net>
To: Nate Yocom <nate@yocom.org>, dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] Input: joystick: xpad: Add X-Box Adaptive Controller support
Date: Thu, 11 Aug 2022 15:19:50 +0200 [thread overview]
Message-ID: <32f116c30f1f071d57e8e2d15425178cbccf9b70.camel@hadess.net> (raw)
In-Reply-To: <20220810141511.11827-1-nate@yocom.org>
Hey,
On Wed, 2022-08-10 at 07:15 -0700, Nate Yocom wrote:
> + /*
> + * X-Box Adaptive controller sets 0x02 when x-box
> button is pressed,
> + * we could probably condense into just data[4] != 0,
> but explicitly
> + * checking here ensures no regression if other
> devices set other bits.
> + */
> + if (le16_to_cpu(xpad->dev->id.vendor) == 0x045e &&
> + le16_to_cpu(xpad->dev->id.product) == 0x0b0a)
> + input_report_key(dev, BTN_MODE, data[4] &
> 0x02);
> + else
> + input_report_key(dev, BTN_MODE, data[4] &
> 0x01);
I won't be able to test the patch until next week, but I would actually
implement what you mention in the comment as a separate patch. This
would avoid having a special-case for a specific VID/PID without a
quirk like "MAP_LAYER_BUTTON" defined, and if it were to cause
problems, it would be straight forward to revert.
next prev parent reply other threads:[~2022-08-11 13:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-10 14:15 Nate Yocom
2022-08-11 13:19 ` Bastien Nocera [this message]
2022-08-13 17:09 ` Nate Yocom
2022-08-13 18:21 ` Nate Yocom
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=32f116c30f1f071d57e8e2d15425178cbccf9b70.camel@hadess.net \
--to=hadess@hadess.net \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nate@yocom.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
all inboxes | Powered by JetHome®