From nobody Sat Feb 7 15:09:56 2026 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 339D838B99A for ; Wed, 7 Jan 2026 15:42:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767800578; cv=none; b=h7nVRvZv/qqbE/Vkh9D5tGS8ei7ZyOz9jf5qpunolbFNNN4lAz5Req2oXG634mdJuS87p9KUWIgHXfb7DWMLs8JyRV5k98Rd3t9kcvz8YQnsTGV1dvKPjU/jAQyammQB/+cz3Y0wxpfgKOuUV4NGcFd/ChjXJXAarKUZmo/grl0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767800578; c=relaxed/simple; bh=m2LVWd9zY2sr7dLTXt464SmzH9m5DeaA++ZT17Hi3XY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VujpK0ak/LbquANT3GfBR7plvXhW154N3GzI7ei7OnYAregcBIyaSJgsDcIcD05d+mshJtOWXE+ByknsDMML5o2SCJjt4rJwaHsr/6DmY/fnuIIRm0Mbm+5gvYx3M2G4vpGBnJ6e+ArRoGxUzwyAWGx9fmELtVTcNCJEBVpEo/U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QSe9CH09; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QSe9CH09" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4775895d69cso11065135e9.0 for ; Wed, 07 Jan 2026 07:42:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767800575; x=1768405375; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=B9oErkAI0lNt2KxcklIPRCVSSCk5fQX4NqQ5cL9hG/s=; b=QSe9CH09HdO9XYvC/2A68XV1CMvo1IQCKjRzguZ6Ildt2mwxIBZOkVZmqNpKfzIMh/ eT5Fl6JZ4PAi7yZIBVOSKr69GvLi+nU9bzedphil94csk9uFS8n7r3tktNHMqo/MxfhV p8AGTM1m+qw+WrK2GOyWypAZIrUesOGQ5kqKbhVxeY4ZIF0VB55Tb/KRTs9TgO0nv11T 70UA0z0RKnhaHKE48dlB2xFzKy4lQHFetwutcMOc6upmh7KdcRh2N2qfxA1wcTMLJ251 a/4EMyZrOgG2rjUkzlCrmF462COHuP5Ph9tKB2LQqNd3Ev4ylJ4kJp9Pn0qjv+ypRjyG Lweg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767800575; x=1768405375; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=B9oErkAI0lNt2KxcklIPRCVSSCk5fQX4NqQ5cL9hG/s=; b=dsrL5BmPHp7n6J+E+cYwYnQxLZ7junbpsXyPOzz+4M9qQg64KOHZRiQr3q1faUAK7t fh46L4dfPA5oUprZFj8l2wrqfa3GLUxoQRYrVUaVVCU0wdCDk1uFBdrolOJpKGtF/mLI FJcLj+XDjXAK9l3Rfm6vXpY6ricvsO3LUk4XAGwT2gVW71/AlQvSPfA2mFL1mg0OIiQs QuhLfjcF4qxU4NaM0mRmH+aRUskKdOUOJJWwgv7ReLmK16/e+/O7FGaUBrPnsB1b7MoQ tScZQeyPZbjEZIgW/Fd7qjwG9sjkGhVAYsP+ixnD7pCK8jM9Ljn+TvuYtNSxxj9BO3fL bL0A== X-Forwarded-Encrypted: i=1; AJvYcCWK6+98PEniFsVskGRwAuwmczNgeYhaHYGeIVo77UtQ7zfxwuxBP+zxp5FUDL2q5Ds9r+VQc8ugWRf9t8o=@vger.kernel.org X-Gm-Message-State: AOJu0Yy/nVSTGiE+Mkuv7DjreWXG9AT9DfW/rjgt+HK+8oLR7LaGm6Pf A0GR6blQQQyZiJY/4aqfslgtSTwTO8HznJfoBXTz9amMfahlyO6LUCIZ X-Gm-Gg: AY/fxX4YSbRzlrQWLq8qT1UBN3q4DatqtWlE2v5JDUtfZ9TJtkE6AHC9m9RILG63qM3 O/sFlwyHDhb2dKQr2CtFwcaodK7/3vCEKi4eTzX/7zhHQVBvHIbfuYccJjdxtOHyXA4UNrQfG47 kMLLXIoCt/TukWUSq4cQDYmW77Z1Dr+WCnUiRAe5iWGgoDmZ2HxbNHaif1c5Um+kukDa5PU240f pzr2NUAoi13OZR41jbMSdtRhW4X2RO2S1/wyXzebggMxYrZM0NUWT7Q03Cf4dfDIY9z1Pbep+FG RDsRqbdfG4JWOaFFq3uWDMwaHlkceJId1NDaBwVg0YeasowySp6mbxtqIFSJvbzDDJqlhmL7bNG cdaNKKDLFOiYl8pWZ2OY1FCaO/tSDCmkD64jfELQOyO2g/iwBieTOlXRnezVOSJRJysSOivu2/s Fhpy0cxSd2m1KnAtOnnVHv95Puf//IimVtmhUA+nuuz+hOVDKBMA== X-Google-Smtp-Source: AGHT+IEk4YurJaQSGJH4R73CW4Txmfc19dzFpNkcy5aJloEEHwBnUBh9/Km94tklRW1e4lrcvR1y7Q== X-Received: by 2002:a05:6000:4287:b0:432:5c34:fb22 with SMTP id ffacd0b85a97d-432c377c54dmr3691324f8f.22.1767800575390; Wed, 07 Jan 2026 07:42:55 -0800 (PST) Received: from ionutnechita-arz2022.local ([2a02:2f0e:ca09:7000:33fc:5cce:3767:6b22]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd5ee243sm10897704f8f.31.2026.01.07.07.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jan 2026 07:42:54 -0800 (PST) From: "Ionut Nechita (Sunlight Linux)" To: benato.denis96@gmail.com, jikos@kernel.org, bentiss@kernel.org Cc: ionut_n2001@yahoo.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, sunlightlinux@gmail.com, superm1@kernel.org Subject: [PATCH v5 3/4] HID: asus: Add WMI communication infrastructure Date: Wed, 7 Jan 2026 17:42:22 +0200 Message-ID: <20260107154219.164514-8-sunlightlinux@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107154219.164514-2-sunlightlinux@gmail.com> References: <20260107154219.164514-2-sunlightlinux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Ionut Nechita Add infrastructure for the HID driver to communicate with the asus-wmi driver for handling special keys that require WMI communication. This includes: - Define ASUS_WMI_METHODID_NOTIF method ID in asus-wmi.h - Implement asus_wmi_send_event() function to send events to asus-wmi Reviewed-by: Denis Benato Reviewed-by: Mario Limonciello (AMD) Signed-off-by: Ionut Nechita --- drivers/hid/hid-asus.c | 24 ++++++++++++++++++++++ include/linux/platform_data/x86/asus-wmi.h | 1 + 2 files changed, 25 insertions(+) diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index 15c24d5812763..6fcd3213857cf 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -23,6 +23,7 @@ /* */ =20 +#include #include #include #include @@ -321,6 +322,29 @@ static int asus_e1239t_event(struct asus_drvdata *drvd= at, u8 *data, int size) return 0; } =20 +/* + * Send events to asus-wmi driver for handling special keys + */ +static int asus_wmi_send_event(struct asus_drvdata *drvdata, u8 code) +{ + int err; + u32 retval; + + err =3D asus_wmi_evaluate_method(ASUS_WMI_METHODID_DEVS, + ASUS_WMI_METHODID_NOTIF, code, &retval); + if (err) { + pr_warn("Failed to notify asus-wmi: %d\n", err); + return err; + } + + if (retval !=3D 0) { + pr_warn("Failed to notify asus-wmi (retval): 0x%x\n", retval); + return -EIO; + } + + return 0; +} + static int asus_event(struct hid_device *hdev, struct hid_field *field, struct hid_usage *usage, __s32 value) { diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/pla= tform_data/x86/asus-wmi.h index 419491d4abca1..516538b5a527e 100644 --- a/include/linux/platform_data/x86/asus-wmi.h +++ b/include/linux/platform_data/x86/asus-wmi.h @@ -29,6 +29,7 @@ #define ASUS_WMI_METHODID_KBFT 0x5446424B /* KeyBoard FilTer */ #define ASUS_WMI_METHODID_INIT 0x54494E49 /* INITialize */ #define ASUS_WMI_METHODID_HKEY 0x59454B48 /* Hot KEY ?? */ +#define ASUS_WMI_METHODID_NOTIF 0x00100021 /* Notify method */ =20 #define ASUS_WMI_UNSUPPORTED_METHOD 0xFFFFFFFE =20 --=20 2.52.0