From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 BE7233019B0 for ; Wed, 7 Jan 2026 13:07:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767791252; cv=none; b=ZDqqaJ73/IwO5oAE2dUIRdLF077U7ZT4sQxfCmqA0zHuBkaIu46c1Z/Xrgu2revQG5E34MV+FBgXSxzfjiIF6Cgb4yoBBrrhquWMEb638kYGmb1j5jSf9TBPDgGnl5O02tkxb+3RBThfke/Uoydb14jlfBY1i+99Hp+/uEDkR3g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767791252; c=relaxed/simple; bh=xH5gsgBfQEiWzo9DK/QLt3Wevh4y8Ssxnpw6/48yjAM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KWGuOrqizZsZyMJi1vTXZHIShBNUl8+NdjK2U3piVqBInZ9eix7QSu7I7oH28bgDZD4mk1y5mQpkudCnh8fh46PvghBOMNQWd25GksacR0mdr/Gh3UvEaRJNQj9S7g8fvdNCnIVK1TE9NMoNa/bkhxzF4fa3B2UFaH6FTmFrT7g= 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=TW9evVxf; arc=none smtp.client-ip=209.85.221.52 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="TW9evVxf" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-42fb4eeb482so1108948f8f.0 for ; Wed, 07 Jan 2026 05:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767791249; x=1768396049; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=k1dCT+1pQQT3kPiOBouJUS5kwiz8+OJWFQGBn0ExSps=; b=TW9evVxfMUvVbUs8wkTWz5qw4vJlA52UKvsNYDneReQrVtG0JwbRcMtdf8sdfqOC93 GZvEl8q2VLfFUE8lG2etpV6JQQP/4v/nkm0UisHja/U3XmdoKELlRCpJUcR21QcN3Bel Wssu6WtYnJvfRpICW/bArUXMr8vVqsu8jvJAXmfB3qBxvNsGhHA70xsmaoambtdH6UiW 2ERxsOTnzAZ17qBJkwynIWPX4ZOPv/MvWIgTQ0hx4OFWIANxdiDx1jygqUuZRTv0ja/y m7rteOV8LuDcXwa+48wqHL8Cj9UleovDAFOcEwRPSFPFWWf5ASpTFG9XT1BS6mBsOc/I Z5xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791249; x=1768396049; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=k1dCT+1pQQT3kPiOBouJUS5kwiz8+OJWFQGBn0ExSps=; b=l+mWZPE6H4fDahuEoYzdMnatzIT317gWfQGvFg09PVyIFeQQVfdW/CKADCCsGznTwP VwTLjTA8xHX8BOwCNhycSG6t4QNcK4gWEvUptbjlEcS07U7BWP24xDMzkKpNps4fr+FJ sshFRbEAADYRuNtPIze/Irn7rPCyxEpxrbZTcetTMPCtebWEE82Y5MT/rv5o9Ac+yBt+ H3R1zEnMx/bWJQj3mKPEcDyLACbzkF0tY6ovaoVy5m6b8/O5wnsZISavymqNlQzoLQoS 5OJhcm/W8Nknu5pd8vAw0I5PbaoC7cMBAl/xNEchSRLdHpPR2V/4LMhBqTS+epePa/DZ ls1Q== X-Forwarded-Encrypted: i=1; AJvYcCUhIyLLngc51JrvCTUolJsoXSM5T87pdZLyuGoYbp96/x7FNWlcmR3p5KPTmV6SO9NCOuAu5vSIxJUF/is=@vger.kernel.org X-Gm-Message-State: AOJu0Yx99//Ymny6SjHWVF0fjIAX9N6xiJqtoYWKuXEmOo/o/jXd4hc+ 6okcIkZ+SrSx+LC9OZ4oC3FRgA0jno//avvt1MfBIvqHWm567fRBZHSa X-Gm-Gg: AY/fxX5HsNn+oISrVSEDvnRAW3uYGDf19RCtQIpCEt1BYi+zzYSTN8H+aUHKXhOD0Nj q772LoCnjIhN/qQacSVl39TFybv1cqJJTkud4bM77jcRx+TCGG5FDSkNWTdZkDDz79rohWe8oqG BRS3GqIoLUzZTkN28inyHd2pb1Sg8G1AkmxjZBnk5zr4yXLAHwcunhozmLt7T6eVf14kBCK87gI 1kCyBep/pITY1Z8yGwZVJoZlfb1E+0Itbe9ctmy1wDTwlyeNmQ5mWnuOl2XSykB5sny4avYoVFL CBSBeCbw7OxhWrazWcLdlICQy5XMyq3CrbkjO4RD2OOgTYondviIgh42dv3HK9vafl61QG184Ag ql9k4nb4iJLcLxGb22CzznEMp6UGUX99nGghDG3kR6mykMGhIQjWGTMnZlNKNrJT8v9qQ74T1MB 8cpBKnZf49zxdmMlEBNJGO8tU= X-Google-Smtp-Source: AGHT+IGMLiGjctUR1u4VgmKiFKVSg8Zkg/xuA+6Dv30gxx/utHS+cxKm946CvtACHdR9GGnVu7m0+Q== X-Received: by 2002:a05:6000:2584:b0:42f:ba09:aa7c with SMTP id ffacd0b85a97d-432c3765636mr3850488f8f.54.1767791244424; Wed, 07 Jan 2026 05:07:24 -0800 (PST) Received: from [192.168.1.121] ([176.206.93.222]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd0dacd1sm10233823f8f.4.2026.01.07.05.07.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jan 2026 05:07:24 -0800 (PST) Message-ID: <088286f0-3469-4b2a-87bb-56440d40fb82@gmail.com> Date: Wed, 7 Jan 2026 14:07:21 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/4] HID: asus: Add WMI communication infrastructure To: "Ionut Nechita (Sunlight Linux)" , jikos@kernel.org, bentiss@kernel.org Cc: superm1@kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, ionut_n2001@yahoo.com References: <10abfaa7-9f5b-494c-8bb5-5da53c087fc4@kernel.org> <20260107111945.48018-2-sunlightlinux@gmail.com> <20260107111945.48018-8-sunlightlinux@gmail.com> Content-Language: en-US, it-IT, en-US-large From: Denis Benato In-Reply-To: <20260107111945.48018-8-sunlightlinux@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/7/26 12:19, Ionut Nechita (Sunlight Linux) wrote: > From: Ionut Nechita > > Add the infrastructure needed for the HID driver to communicate with > the asus-wmi driver: > > - Add linux/acpi.h include (in alphabetical order) Mentioning the addition of acpi.h seems a bit too specific for a commit message, but wait for hid maintainers to tell. > - Define ASUS_WMI_METHODID_NOTIF method ID in asus-wmi.h > - Implement asus_wmi_send_event() function to send events to asus-wmi > > This infrastructure will be used to handle special keys that require > WMI communication. > > Change-Id: Ic4d9b35f8b1f2b48c7c26e7259b4d05951021b58 > 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 06cd3d3b74af7..05fa35489258d 100644 > --- a/drivers/hid/hid-asus.c > +++ b/drivers/hid/hid-asus.c > @@ -23,6 +23,7 @@ > /* > */ > > +#include > #include > #include > #include > @@ -321,6 +322,29 @@ static int asus_e1239t_event(struct asus_drvdata *drvdat, u8 *data, int size) > return 0; > } > > +/* > + * 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 = asus_wmi_evaluate_method(ASUS_WMI_METHODID_DEVS, > + ASUS_WMI_METHODID_NOTIF, code, &retval); This code is based on the fact asus-wmi driver is available: are you sure this doesn't make the kernel compilation fail if such driver is not enabled? > + if (err) { > + pr_warn("Failed to notify asus-wmi: %d\n", err); > + return err; > + } > + > + if (retval != 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/platform_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 */ > > #define ASUS_WMI_UNSUPPORTED_METHOD 0xFFFFFFFE >