All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vicki Pfau" <vi@endrift.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: Re: [PATCH v7 09/12] Input: xbox_gip - Add support for PDP guitar controllers
Date: Sat, 12 Sep 2026 03:23:23 +0000	[thread overview]
Message-ID: <20260912032324.4251A1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260912030426.2997003-10-vi@endrift.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Payload-dependent format parsing causes inconsistent button mapping and aliasing on the RiffMaster.
--

commit f157752e23d4ee774cfa5a7ee1c93ecfd2cc8d44
Author: Vicki Pfau <vi@endrift.com>

Input: xbox_gip - Add support for PDP guitar controllers

This commit adds support for the PDP guitar controllers (Fender Jaguar and
RiffMaster models) to the xbox_gip driver. It introduces custom input mapping
capabilities and specific report parsing for the two variants of the device.

> diff --git a/drivers/input/joystick/gip/gip-pdp-jaguar.c b/drivers/input/joystick/gip/gip-pdp-jaguar.c
> new file mode 100644
> index 0000000000000..ec0e9d811d125
> --- /dev/null
> +++ b/drivers/input/joystick/gip/gip-pdp-jaguar.c

[ ... ]

> +static int gip_handle_pdp_jaguar_report(struct gip_attachment *attachment,
> +	struct input_dev *input, const uint8_t *bytes, int num_bytes)
> +{

[ ... ]

> +	if (num_bytes >= 7 && (bytes[5] || bytes[6])) {

[Severity: High]
Does this payload-dependent condition break the RiffMaster layout when all
frets are released?

If a RiffMaster user releases all neck frets, bytes[5] and bytes[6] 
become 0. This causes the condition to fail, dropping the driver into the
legacy Jaguar format in the else block below.

> +		/* Newer report version on the RiffMaster */
> +		input_report_key(input, BTN_TRIGGER_HAPPY1, bytes[5] & BIT(0));
> +		input_report_key(input, BTN_TRIGGER_HAPPY2, bytes[5] & BIT(1));

[ ... ]

> +		input_report_key(input, BTN_TRIGGER_HAPPY9, bytes[6] & BIT(3));
> +		input_report_key(input, BTN_TRIGGER_HAPPY10, bytes[6] & BIT(4));
> +	} else {
> +		lower = bytes[1] & BIT(6);

[Severity: High]
When falling back to this legacy path for the RiffMaster, doesn't it cause
unintended button aliasing?

On the RiffMaster, bytes[1] & BIT(6) is mapped to BTN_THUMBR.

If the driver falls back to this path because all frets were temporarily
released, and the user happens to be holding the right stick button (or other
standard buttons located in bytes[0]), won't those inputs falsely register as
fret presses (BTN_TRIGGER_HAPPY1 through 10)?

Could this layout format decision use the static hardware quirk
(attachment->quirks & GIP_QUIRK_PDP_HAS_RIGHT_STICK) instead of relying on
transient payload data to distinguish between the controller variants?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260912030426.2997003-1-vi@endrift.com?part=9

  reply	other threads:[~2026-09-12  3:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12  3:04 [PATCH v7 00/12] Input: xbox_gip - Add new driver for Xbox GIP Vicki Pfau
2026-09-12  3:04 ` [PATCH v7 01/12] " Vicki Pfau
2026-09-12  3:25   ` sashiko-bot
2026-09-12  3:04 ` [PATCH v7 02/12] Input: xpad - Remove Xbox One support Vicki Pfau
2026-09-12  3:22   ` sashiko-bot
2026-09-12  3:04 ` [PATCH v7 03/12] Input: xbox_gip - Add controllable LED support Vicki Pfau
2026-09-12  3:20   ` sashiko-bot
2026-09-12  3:04 ` [PATCH v7 04/12] Input: xbox_gip - Add HID relaying Vicki Pfau
2026-09-12  3:21   ` sashiko-bot
2026-09-12  3:04 ` [PATCH v7 05/12] Input: xbox_gip - Add battery support Vicki Pfau
2026-09-12  3:22   ` sashiko-bot
2026-09-12  3:04 ` [PATCH v7 06/12] Input: xbox_gip - Allow sending fragmented and ACME messages Vicki Pfau
2026-09-12  3:23   ` sashiko-bot
2026-09-12  3:04 ` [PATCH v7 07/12] Input: xbox_gip - Add security implementation from xone Vicki Pfau
2026-09-12  3:21   ` sashiko-bot
2026-09-12  3:04 ` [PATCH v7 08/12] Input: xbox_gip - Add arcade stick support Vicki Pfau
2026-09-12  3:16   ` sashiko-bot
2026-09-12  3:04 ` [PATCH v7 09/12] Input: xbox_gip - Add support for PDP guitar controllers Vicki Pfau
2026-09-12  3:23   ` sashiko-bot [this message]
2026-09-12  3:04 ` [PATCH v7 10/12] Input: Add ABS_CLUTCH, HANDBRAKE, and SHIFTER Vicki Pfau
2026-09-12  3:28   ` sashiko-bot
2026-09-12  3:04 ` [PATCH v7 11/12] HID: Map more automobile simulation inputs Vicki Pfau
2026-09-12  3:28   ` sashiko-bot
2026-09-12  3:04 ` [PATCH v7 12/12] Input: xbox_gip - Add wheel support Vicki Pfau
2026-09-12  3:33   ` sashiko-bot

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=20260912032324.4251A1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vi@endrift.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.