All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Benato <denis.benato@linux.dev>
To: Paolo Pisati <p.pisati@gmail.com>, Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>
Cc: "Joshua Leivenzon" <hacker1024@users.sourceforge.net>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Luke Jones" <luke@ljones.dev>, "Ivan Levchenko" <me@livan.pro>,
	"Rebecca Mara Müller" <rebecca.mara@posteo.de>,
	"Nathan Chancellor" <nathan@kernel.org>
Subject: Re: [PATCH v3 3/7] HID: asus: Force hid-input to bind to the Zenbook Duo hotkey interface
Date: Sun, 18 Oct 2026 18:06:36 +0200	[thread overview]
Message-ID: <f93c315e-db6f-4322-9081-e192da12e58f@linux.dev> (raw)
In-Reply-To: <20261013104033.36079-4-p.pisati@gmail.com>


On 10/13/26 12:40, Paolo Pisati wrote:
> From: Joshua Leivenzon <hacker1024@users.sourceforge.net>
>
> The Zenbook Duo USB keyboard reports its hotkeys on a dedicated
> interface, separate from the keyboard and consumer control ones, that
> only contains ASUS vendor usage collections. hid-input does not
> consider those an input application and never binds to the interface,
> so the hotkeys are never mapped.
>
> Pass HID_CONNECT_HIDINPUT_FORCE for the interface of Zenbook Duo
> keyboards that carries the ASUS vendor collection, which skips that
> check, so the vendor usages go through asus_input_mapping() like on
> any other ASUS keyboard. The other interfaces either have a proper
> input application or nothing worth an input device.
>
> Signed-off-by: Joshua Leivenzon <hacker1024@users.sourceforge.net>
> [pisati: use HID_CONNECT_HIDINPUT_FORCE on the vendor interface instead
>  of injecting a fake keyboard collection into its report descriptor]
> Assisted-by: LLM

Same as the other one, Assisted-by isn't right like this... About the rest:

Reviewed-by: Denis Benato <denis.benato@linux.dev>

> Signed-off-by: Paolo Pisati <p.pisati@gmail.com>
> Tested-by: Rebecca Mara Müller <rebecca.mara@posteo.de> # UX8407AA
> ---
>  drivers/hid/hid-asus.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> index 242e273e4cb3..d69431615c27 100644
> --- a/drivers/hid/hid-asus.c
> +++ b/drivers/hid/hid-asus.c
> @@ -1405,6 +1405,7 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
>  	struct asus_drvdata *drvdata;
>  	struct hid_report *rep;
>  	bool is_vendor = false;
> +	unsigned int connect_mask;
>  	int ret;
>  
>  	drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);
> @@ -1500,7 +1501,18 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
>  		return ret;
>  	}
>  
> -	ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
> +	/*
> +	 * The Zenbook Duo keyboard reports its hotkeys on a dedicated USB
> +	 * interface that only has vendor usage collections, which hid-input
> +	 * does not consider an input application. Make it bind to the
> +	 * interface carrying the ASUS vendor collection anyway so the
> +	 * hotkeys get mapped.
> +	 */

I would shorten this comment, but I'm not good in this and the code is okay so
I gave reviewed-by regardless: do what you wish with my suggestion.

> +	connect_mask = HID_CONNECT_DEFAULT;
> +	if ((drvdata->quirks & QUIRK_ZENBOOK_DUO_KEYBOARD) && is_vendor)
> +		connect_mask |= HID_CONNECT_HIDINPUT_FORCE;
> +
> +	ret = hid_hw_start(hdev, connect_mask);
>  	if (ret) {
>  		asus_worker_stop(drvdata->worker);
>  		hid_err(hdev, "Asus hw start failed: %d\n", ret);

  reply	other threads:[~2026-10-18 16:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13 10:39 [PATCH v3 0/7] HID: asus: ASUS Zenbook Duo keyboard support Paolo Pisati
2026-10-13 10:39 ` [PATCH v3 1/7] HID: asus: Fix up Zenbook Duo report descriptors Paolo Pisati
2026-10-18 15:50   ` Denis Benato
2026-10-18 16:18     ` Rebecca Mara Müller
2026-10-18 17:52       ` Denis Benato
2026-10-13 10:39 ` [PATCH v3 2/7] HID: asus: Add missing Zenbook Duo hotkeys Paolo Pisati
2026-10-18 15:55   ` Denis Benato
2026-10-18 21:38     ` Nathan Chancellor
2026-10-18 21:39       ` Denis Benato
2026-10-13 10:40 ` [PATCH v3 3/7] HID: asus: Force hid-input to bind to the Zenbook Duo hotkey interface Paolo Pisati
2026-10-18 16:06   ` Denis Benato [this message]
2026-10-13 10:40 ` [PATCH v3 4/7] HID: asus: Cycle the platform profile from the Zenbook Duo profile key Paolo Pisati
2026-10-18 16:27   ` Denis Benato
2026-10-13 10:40 ` [PATCH v3 5/7] HID: asus: Do not send feature reports larger than declared Paolo Pisati
2026-10-18 16:52   ` Denis Benato
2026-10-13 10:40 ` [PATCH v3 6/7] HID: asus: add prod-id, quirk for Zenbook Duo keyboard Paolo Pisati
2026-10-18 16:57   ` Denis Benato
2026-10-18 21:43     ` Nathan Chancellor
2026-10-18 21:46       ` Denis Benato
2026-10-13 10:40 ` [PATCH v3 7/7] HID: asus: Re-send the Zenbook Duo keyboard handshake after probe Paolo Pisati
2026-10-18 17:10   ` Denis Benato
2026-10-18 19:18     ` Rebecca Mara Müller
2026-10-18 19:48       ` Denis Benato
2026-10-19  6:12         ` Rebecca Mara Müller
2026-10-19 11:03           ` Denis Benato
2026-10-19 13:36             ` Rebecca Mara Müller
2026-10-13 11:45 ` [PATCH v3 0/7] HID: asus: ASUS Zenbook Duo keyboard support Rebecca Mara Müller
2026-10-13 13:56   ` Denis Benato
2026-10-14 13:21     ` Paolo Pisati
2026-10-18 17:21       ` Denis Benato

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=f93c315e-db6f-4322-9081-e192da12e58f@linux.dev \
    --to=denis.benato@linux.dev \
    --cc=bentiss@kernel.org \
    --cc=hacker1024@users.sourceforge.net \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=me@livan.pro \
    --cc=nathan@kernel.org \
    --cc=p.pisati@gmail.com \
    --cc=rebecca.mara@posteo.de \
    /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.