From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2236633F380; Thu, 20 Nov 2025 13:40:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763646059; cv=none; b=SbMa9xiQerL0RZUhoby9/jXHtCp9UfloAcwf+WPh8J1D2kZ7DgotLqtiVFk9eY0kIIV5lmerMce5n5qzg7wZ12vHBRV9pXb/2wUABL/Iw+QD1OfyyDooiUF8k0c/3Etamylohse/+CxD/b0hLuZe/7ZBvauWt2EYD7Dk38n+lnc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763646059; c=relaxed/simple; bh=eavknlgNKfHrP4DZliXYcSB3sukFz2ofn03ReMQMgPE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=raoXpNfZi83bsfjxcX0/9lU9FnbT14k6bF8/3RNHAACTxYTzg3Gyog+TQY0OTzheaZbyWHN3J4CBWCYRyY1pM/PIaUtv6860mvhTErHS+d2P4JHObCqYizUmZ9/OP3NbiL2KF4mL/pZIEUqkLMofRUFw0GpXPG76FRwvcDYlfq8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=S8ghEXp+; arc=none smtp.client-ip=212.227.15.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="S8ghEXp+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1763646052; x=1764250852; i=w_armin@gmx.de; bh=eavknlgNKfHrP4DZliXYcSB3sukFz2ofn03ReMQMgPE=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=S8ghEXp+rHoEu8Pptrq9hBxnGnD6HO/AZnF3Lj7vvJocdnJy+8SpcbDiuuULy8d5 L1lY2t+6zcLWeyiXJ5Njo0fM6934ASusc+0DaZFsACminLj5x4R8GDklCxsxp3wZR veiSplGCgoLVp1k4gVLndX+jExH8RxBxT1IhWbu1o1Uz5b1n5S7itqmnEb2c2tjr3 TZomxUPf+uJVehbr2rrkn/6mIUM8MD2tSISE5U67p6iBOVS2MohTGcyA3f55nyNOt p+fCZvqcmOJcHCjd1LXlP0lHokHM4wUTvoKEAdGnOxUJuzURC7qZqXsfZ8k3xDiv5 1pTOhzxtvsJ6uKOggw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [172.16.70.236] ([141.76.8.172]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MXp9i-1verGx3Dci-00SOEY; Thu, 20 Nov 2025 14:40:51 +0100 Message-ID: Date: Thu, 20 Nov 2025 14:40:49 +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 2/6] platform/x86/uniwill: Handle more WMI events required for TUXEDO devices To: Werner Sembach , hansg@kernel.org, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org References: <20251117132530.32460-1-wse@tuxedocomputers.com> <20251117132530.32460-3-wse@tuxedocomputers.com> <29b24831-92d4-47c6-8daf-7d1879951d43@tuxedocomputers.com> <7cd7081f-b138-4548-a9fb-5c4d5165b036@gmx.de> <7276b961-8649-4bc0-87f7-a1f06cd4f3ad@tuxedocomputers.com> <5b554128-7466-4b34-9020-c0c39572f100@gmx.de> <3c075220-79f3-4dff-a760-6fe065147793@tuxedocomputers.com> <2d5d88fe-cd54-4311-b5cd-b1c435ff973d@gmx.de> <59b75eb5-59f8-472f-ad98-5d333eebebe5@tuxedocomputers.com> Content-Language: en-US From: Armin Wolf In-Reply-To: <59b75eb5-59f8-472f-ad98-5d333eebebe5@tuxedocomputers.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:3VmafSc5bxAG7NV9rrzQwE7Gsctx4o8QLFv80xVzF+j7wsV/ni0 n/+2qZuFi7heI0Avp3OnOuzGOeOcec42aSVxuqqt3KYtksRAivhNJO/saI/3WgdATM/gDet IyZT3PE3q9iGQfxjgHaP+ESD4F2JikvH46VUXNXGnpNN02jgeGZz3s30+ZjO0jQFLTsnc3f Uxs6J7dpFgyw4YkgAN0yA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:cTUG7N/IqSk=;06K/vwjwI2MjXDYXnM6FJMj94TX bmulnq8htOUnSZ1EWXemiACS47mMnFG3vhht2zROJTB7yUJ6JsV4OflgJGem09JkyWkAELfPU +XocJyr18tJOFGWrf0DpFCImsz6Qvnn1+N0ec+M7UnD83IgkzNVM5YUpFcXzgEq67xQpM4tDd y5zl4OJlK7zGSWBEt+yqXEKtVwLH1MV+elHVd6lUasI67Wx01f/bQdpH9MMBqGDznM7cr+uiI ExNTnR0bvLQv1NrPDiIy3wWkWsookeg/QlzwA2qsOUF1uhtbGBuGgHAW2HXDENsNyv79B4Fhb oltuWHfk1B4mMonuy0k7wLCnHKB2HG/3SQfSWE/F62KYXDmLShiZOTI+EW6Jxsmu3ozZgRTqi ET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V8BG2DbN0hc5a0vYnChS1W4 TyesRcANC2kqcMRQs7tP59i+35Gp7F8w0lGHf5/CrGVb04l/hm1m9XKoWTQT1GnBUlMizpOWO +AuHUkoZFF1oMRXSvv/uE9SzR5UE+szNPoWXwyfMEq9w+Lfta+5h1E+JoB2txj+upb2smndgg KsUkitSaM1H7Ums/Kx7M1+ueHIqHHK2GB6qZ5IyDA9cmJZX0r1rArwLp+YY6ePfk4EATWMnBH Z7sd83L4y3rPIe3dWyBJv6aqUTj6a8jJiUgXJU+Y82s9fBT7u+C7HYHVVkvUZszWHlKFTD58+ zcqGVncc8+txBVDDETjJIqC0o3QP5cCq1lIzcZv/l8ZLJmqucCK8owuDE6D6dJKLYOQUJau5T ijFV50oDF9lDAaTCGJdhBE9sjBBva9+CqxJX5QJ7JWsDuqSjXKNWJ6Ip878nHLzwRIGSylX/E 3+TT58Z3HYAFrWJHGLhS6UKgqAqX78am6dfSXJmL0z+kwHDqV3ELDB/y4JuwFh3peXsS/HFcn FiXVvNZelR/t8iuJIgDpQIGotCMqlyrB9HpQ/U+Qr8Pmo/9b5T7VdlUf13YsctedRUsphFNKV q7wMOVBksAno1z3LnGqrMb0Ze8HBlYuq5LpiLxCEhxDMi687S8Z950kBLsPIILJj9Rht2mQA= Am 20.11.25 um 11:42 schrieb Werner Sembach: > > Am 20.11.25 um 01:53 schrieb Armin Wolf: >> Am 18.11.25 um 16:05 schrieb Werner Sembach: >> >>> >>> Am 18.11.25 um 15:41 schrieb Armin Wolf: >>>> Am 18.11.25 um 15:27 schrieb Werner Sembach: >>>> >>>>> >>>>> Am 18.11.25 um 14:48 schrieb Armin Wolf: >>>>>> Am 18.11.25 um 14:29 schrieb Werner Sembach: >>>>>> >>>>>>> >>>>>>> Am 18.11.25 um 14:12 schrieb Armin Wolf: >>>>>>>> Am 18.11.25 um 13:45 schrieb Werner Sembach: >>>>>>>> >>>>>>>>> >>>>>>>>> Am 18.11.25 um 12:08 schrieb Armin Wolf: >>>>>>>>>> Am 17.11.25 um 14:23 schrieb Werner Sembach: >>>>>>>>>> >>>>>>>>>>> Handle some more WMI events that are triggered on TUXEDO=20 >>>>>>>>>>> devices. >>>>>>>>>>> >>>>>>>>>>> Signed-off-by: Werner Sembach >>>>>>>>>>> --- >>>>>>>>>>> =C2=A0 drivers/platform/x86/uniwill/uniwill-acpi.c | 19=20 >>>>>>>>>>> ++++++++++++++++++- >>>>>>>>>>> =C2=A0 drivers/platform/x86/uniwill/uniwill-wmi.h | 2 ++ >>>>>>>>>>> =C2=A0 2 files changed, 20 insertions(+), 1 deletion(-) >>>>>>>>>>> >>>>>>>>>>> diff --git a/drivers/platform/x86/uniwill/uniwill-acpi.c=20 >>>>>>>>>>> b/drivers/platform/x86/uniwill/uniwill-acpi.c >>>>>>>>>>> index 29bb3709bfcc8..0cb86a701b2e1 100644 >>>>>>>>>>> --- a/drivers/platform/x86/uniwill/uniwill-acpi.c >>>>>>>>>>> +++ b/drivers/platform/x86/uniwill/uniwill-acpi.c >>>>>>>>>>> @@ -371,9 +371,11 @@ static const struct key_entry=20 >>>>>>>>>>> uniwill_keymap[] =3D { >>>>>>>>>>> =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Reported in manual mo= de when toggling the=20 >>>>>>>>>>> airplane mode status */ >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { KE_KEY,=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 UNIWILL_OSD_RFKILL, { KEY_RFKILL }}, >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0 { KE_IGNORE,=C2=A0=C2=A0=C2=A0 UNIWILL_OSD= _RADIOON, { KEY_UNKNOWN }}, >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0 { KE_IGNORE,=C2=A0=C2=A0=C2=A0 UNIWILL_OSD= _RADIOOFF, { KEY_UNKNOWN }}, >>>>>>>>>>> =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Reported when user wa= nts to cycle the platform=20 >>>>>>>>>>> profile */ >>>>>>>>>>> -=C2=A0=C2=A0=C2=A0 { KE_IGNORE, UNIWILL_OSD_PERFORMANCE_MODE_= TOGGLE, {=20 >>>>>>>>>>> KEY_UNKNOWN }}, >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0 { KE_KEY, UNIWILL_OSD_PERFORMANCE_MODE_TOG= GLE, {=20 >>>>>>>>>>> KEY_F14 }}, >>>>>>>>>> >>>>>>>>>> I am currently working a patch adding platform profile=20 >>>>>>>>>> support, so this event would >>>>>>>>>> be handled inside the kernel on models with platform profile=20 >>>>>>>>>> support. >>>>>>>>> >>>>>>>>> For tuxedo devices we have profiles managed in userspace that=20 >>>>>>>>> do additional things. So we need a way to handle this in=20 >>>>>>>>> userspace. >>>>>>>>> >>>>>>>> Do these things have something to do with the uniwill EC? If so= =20 >>>>>>>> then we should implement those inside the driver >>>>>>>> itself. The control center can then poll the platform profile=20 >>>>>>>> sysfs file to get notified when platform_profile_cycle() >>>>>>>> is executed to perform additional actions. >>>>>>> Not exclusively, e.g. one thing is display brightness. >>>>>> >>>>>> And you cannot poll the sysfs interface? >>>>> I can't follow you atm? >>>> >>>> I meant to ask whether or not your application could poll the=20 >>>> platform profile sysfs interface for changes instead of >>>> listing for the F14 key. >>> But the platform profiles are a fixed number? TCC currently allows=20 >>> an arbitrary amount of profiles being created. >> >> With "poll the platform profile sysfs interface" i meant that you=20 >> could use poll() (https://linux.die.net/man/2/poll) >> or epoll() on the sysfs file containing the current platform profile. > Sorry i think i still don't completely get what you mean with platform= =20 > profile. I assume you have a poc on github? If not can you give me a=20 > short overview? Example code, might not work: from select import poll, POLLPRI fd =3D open("|/sys/firmware/acpi/platform_profile", "r") p =3D poll()=20 p.register(fd.fileno(), POLLPRI) # Wait till platform profile changes=20 p.poll() print("Platform profile changed") This however comes with the=20 drawback that you cannot prevent the platform profile from cycling. If=20 you want to do that manually depending on the settings inside your=20 custom profiles, then maybe we can keep the F14 hack for now. I will=20 then add a module option when adding platform profile support to select=20 between platform_profile_cycle() and the F14 keycode. Does this sound OK?| >> >> Anyway, i attached the patch with the device descriptor=20 >> infrastructure. The callback called during probe cannot modify >> the feature bitmap anymore, but i suggest that you simply set the=20 >> limit for cTGP to zero. The code responsible for >> initializing cTGP support can then check if the cTGP limit is zero=20 >> and return early. > > I wonder if we should directly put that into a formal quirk list.=20 > Opinions? > > Best regards, > > Werner > The problem is that the quirk list will become RO before the driver can ac= cess the EC, so we have to use uniwill_data for storing this information. Thanks, Armin Wolf >> >> Thanks, >> Armin Wolf >> >>>> >>>> Thanks, >>>> Armin Wolf >>>> >>>>>> >>>>>>>> >>>>>>>>> The 2 things I can spontaneously think of would be a sysfs=20 >>>>>>>>> toggle or 2 different UNIWILL_FEATURE_* defines. >>>>>>>>> >>>>>>>> TPH i would love to have an ordinary keycode allocated for that= =20 >>>>>>>> if the above does not work for you. There already >>>>>>>> exists KEY_PERFORMANCE, so adding something like=20 >>>>>>>> KEY_PERFORMANCE_CYCLE should be possible. >>>>>>> >>>>>>> New keycodes won't work on X11, I don't know the reason, but X11= =20 >>>>>>> only supports a max of 248 keycodes >>>>>>> >>>>>>> That's why for example touchpad toggle is bound to F21 e.g. here= =20 >>>>>>> https://elixir.bootlin.com/linux/v6.17.8/source/drivers/platform/x= 86/lg-laptop.c#L106=20 >>>>>>> . >>>>>>> >>>>>> Oh no. In this case using F14 is fine. >>>>>> >>>>>> >>>>>> Thanks, >>>>>> Armin Wolf >>>>>> >>>>>>>> >>>>>>>>>> >>>>>>>>>>> =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Reported when the use= r wants to adjust the=20 >>>>>>>>>>> brightness of the keyboard */ >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { KE_KEY, UNIWILL_OSD_KBDILLUMD= OWN, { KEY_KBDILLUMDOWN=20 >>>>>>>>>>> }}, >>>>>>>>>>> @@ -382,11 +384,19 @@ static const struct key_entry=20 >>>>>>>>>>> uniwill_keymap[] =3D { >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Reported when the user wants= to toggle the=20 >>>>>>>>>>> microphone mute status */ >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { KE_KEY,=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 UNIWILL_OSD_MIC_MUTE, { KEY_MICMUTE }}, >>>>>>>>>>> =C2=A0 +=C2=A0=C2=A0=C2=A0 /* Reported when the user wants to = toggle the mute=20 >>>>>>>>>>> status */ >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0 { KE_IGNORE,=C2=A0=C2=A0=C2=A0 UNIWILL_OSD= _MUTE, { KEY_MUTE }}, >>>>>>>>>> >>>>>>>>>> Why is this event being ignored? >>>>>>>>> Because the UNIWILL_OSD_MUTE event is sent in addition to the=20 >>>>>>>>> mute key event, so not ignoring it here would result in a=20 >>>>>>>>> double trigger. >>>>>>>> >>>>>>>> I understand. >>>>>>>> >>>>>>>>>> >>>>>>>>>>> + >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Reported when the user locks= /unlocks the Fn key */ >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { KE_IGNORE,=C2=A0=C2=A0=C2=A0 = UNIWILL_OSD_FN_LOCK, { KEY_FN_ESC }}, >>>>>>>>>>> =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Reported when the use= r wants to toggle the=20 >>>>>>>>>>> brightness of the keyboard */ >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { KE_KEY, UNIWILL_OSD_KBDILLUMT= OGGLE, {=20 >>>>>>>>>>> KEY_KBDILLUMTOGGLE }}, >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0 { KE_KEY, UNIWILL_OSD_KB_LED_LEVEL0, {=20 >>>>>>>>>>> KEY_KBDILLUMTOGGLE }}, >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0 { KE_KEY, UNIWILL_OSD_KB_LED_LEVEL1, {=20 >>>>>>>>>>> KEY_KBDILLUMTOGGLE }}, >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0 { KE_KEY, UNIWILL_OSD_KB_LED_LEVEL2, {=20 >>>>>>>>>>> KEY_KBDILLUMTOGGLE }}, >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0 { KE_KEY, UNIWILL_OSD_KB_LED_LEVEL3, {=20 >>>>>>>>>>> KEY_KBDILLUMTOGGLE }}, >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0 { KE_KEY, UNIWILL_OSD_KB_LED_LEVEL4, {=20 >>>>>>>>>>> KEY_KBDILLUMTOGGLE }}, >>>>>>>>>>> =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* FIXME: find out the e= xact meaning of those events */ >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { KE_IGNORE, UNIWILL_OSD_BAT_CH= ARGE_FULL_24_H, {=20 >>>>>>>>>>> KEY_UNKNOWN }}, >>>>>>>>>>> @@ -395,6 +405,9 @@ static const struct key_entry=20 >>>>>>>>>>> uniwill_keymap[] =3D { >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Reported when the user wants= to toggle the=20 >>>>>>>>>>> benchmark mode status */ >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { KE_IGNORE, UNIWILL_OSD_BENCHM= ARK_MODE_TOGGLE, {=20 >>>>>>>>>>> KEY_UNKNOWN }}, >>>>>>>>>>> =C2=A0 +=C2=A0=C2=A0=C2=A0 /* Reported when the user wants to = toggle the webcam */ >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0 { KE_IGNORE, UNIWILL_OSD_WEBCAM_TOGGLE, { = KEY_UNKNOWN }}, >>>>>>>>>> >>>>>>>>>> Same as above. >>>>>>>>> >>>>>>>>> Same as above ;) >>>>>>>>> >>>>>>>>> At least iirc, would have to double check >>>>>>>>> >>>>>>>> Ok. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Armin Wolf >>>>>>>> >>>>>>>>>> >>>>>>>>>>> + >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { KE_END } >>>>>>>>>>> =C2=A0 }; >>>>>>>>>>> =C2=A0 @@ -1247,6 +1260,10 @@ static int=20 >>>>>>>>>>> uniwill_notifier_call(struct notifier_block *nb, unsigned=20 >>>>>>>>>>> long action >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >>>>>>>>>>> mutex_unlock(&data->battery_lock); >>>>>>>>>>> =C2=A0 +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return NOTI= FY_OK; >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0 case UNIWILL_OSD_DC_ADAPTER_CHANGED: >>>>>>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // noop for the ti= me being >>>>>>>>>> >>>>>>>>>> Wrong comment style, please use /* */. >>>>>>>>> ack >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> Armin Wolf >>>>>>>>>> >>>>>>>>>>> + >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return = NOTIFY_OK; >>>>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 default: >>>>>>>>>>> mutex_lock(&data->input_lock); >>>>>>>>>>> diff --git a/drivers/platform/x86/uniwill/uniwill-wmi.h=20 >>>>>>>>>>> b/drivers/platform/x86/uniwill/uniwill-wmi.h >>>>>>>>>>> index 2bf69f2d80381..48783b2e9ffb9 100644 >>>>>>>>>>> --- a/drivers/platform/x86/uniwill/uniwill-wmi.h >>>>>>>>>>> +++ b/drivers/platform/x86/uniwill/uniwill-wmi.h >>>>>>>>>>> @@ -113,6 +113,8 @@ >>>>>>>>>>> =C2=A0 =C2=A0 #define UNIWILL_OSD_BENCHMARK_MODE_TOGGLE 0xC0 >>>>>>>>>>> =C2=A0 +#define UNIWILL_OSD_WEBCAM_TOGGLE 0xCF >>>>>>>>>>> + >>>>>>>>>>> =C2=A0 #define UNIWILL_OSD_KBD_BACKLIGHT_CHANGED 0xF0 >>>>>>>>>>> =C2=A0 =C2=A0 struct device; >>>>>>>>> >>>>> >>> >