From: Lee Jones <lee@kernel.org>
To: Ping Cheng <pinglinux@gmail.com>
Cc: jikos@kernel.org, bentiss@kernel.org,
linux-input@vger.kernel.org, stable@vger.kernel.org,
Ping Cheng <ping.cheng@wacom.com>
Subject: Re: [PATCH 2/2] HID: wacom: Setup SW_MUTE_DEVICE according to the order of input registration
Date: Wed, 23 Sep 2026 08:45:03 +0100 [thread overview]
Message-ID: <20260923074503.GD3438784@google.com> (raw)
In-Reply-To: <20260922210527.22420-1-ping.cheng@wacom.com>
On Tue, 22 Sep 2026, Ping Cheng wrote:
> From: Ping Cheng <ping.cheng@wacom.com>
>
> The refactored SW_MUTE_DEVICE code assumed that stylus will be
> the first regiestered input. In reality, touch can be registered
> before stylus, such as the Wacom Cintiq Pro 13 and 16.
>
> This patch covers both touch-first and stylus-first cases.
>
> Cc: stable@vger.kernel.org
> Fixes: ba16e5ffbaa1 ("HID: wacom: Advertise SW_MUTE_DEVICE capability prior to registration")
> Reviewed-by: Lee Jones <lee@kernel.org>
I did not review this patch!
> Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
> ---
> drivers/hid/wacom_wac.c | 22 +++++++++++++++++++---
> 1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
> index c4cd87b781c4..9520296cb349 100644
> --- a/drivers/hid/wacom_wac.c
> +++ b/drivers/hid/wacom_wac.c
> @@ -3977,10 +3977,12 @@ int wacom_setup_touch_input_capabilities(struct input_dev *input_dev,
>
> if (features->type == HID_GENERIC) {
> hid_dbg(hdev, "generic touch setup\n");
> - if (wacom_wac->has_mute_touch_switch ||
> - (wacom_wac->shared && READ_ONCE(wacom_wac->shared->has_mute_touch_switch))) {
> +
> + /* setup touch switch for those devices that report pen interface first
> + * can only be done here since we only call this routine once
> + */
This is the incorrect multi-line comment format.
Sentences start with uppercase chars.
> + if (wacom_wac->shared && READ_ONCE(wacom_wac->shared->has_mute_touch_switch)) {
> input_set_capability(input_dev, EV_SW, SW_MUTE_DEVICE);
> - wacom_wac->has_mute_touch_switch = true;
> }
> /* setup has already been done */
> return 0;
> @@ -4403,7 +4405,21 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
> break;
>
> case INTUOSHT3_BT:
> + break;
> +
> case HID_GENERIC:
> + if (wacom_wac->shared) {
> + /*
> + * setup touch switch capability can only be done here
> + * for those devices that have touch input registered
> + * before stylus and pad inputs.
It might be worth explaining the limitation.
What happens if those prerequisites are not satisfied?
> + */
> + if (wacom_wac->has_mute_touch_switch &&
> + wacom_wac->shared->touch_input) {
> + input_set_capability(wacom_wac->shared->touch_input,
> + EV_SW, SW_MUTE_DEVICE);
> + }
> + }
> break;
>
> default:
> --
> 2.55.0
>
--
Lee Jones
prev parent reply other threads:[~2026-09-23 7:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 21:05 [PATCH 2/2] HID: wacom: Setup SW_MUTE_DEVICE according to the order of input registration Ping Cheng
2026-09-23 7:45 ` Lee Jones [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=20260923074503.GD3438784@google.com \
--to=lee@kernel.org \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=ping.cheng@wacom.com \
--cc=pinglinux@gmail.com \
--cc=stable@vger.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