From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4AEB1205501; Thu, 12 Dec 2024 16:43:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734021791; cv=none; b=JQoWQiRLG+kPpo045DUy4Q417wfvKs6XLaBJ0cQAQ8xNeqNtJi5+MEZYkNACX+mCAH0HqYcEHV9syNuTt2jYT33FQ+1i7tNlnW03hT7fuyFS6OHqL1+p7Wz4StQ3MY+MT0yeljd8Ene4pCWVwiULLixZDvGq6u4cXpIhibuLejA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734021791; c=relaxed/simple; bh=VrABIsGvxrppnCXsUsL8GoyoNp7ft1DtBAV8yPH9+/A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nnwhPSPnnCjUJ01jP+qCRctSjmtNleq6FJKr4fBNq5bAGWxGarSo/jkfrJ69VE1ZUUQSKMd7jLAel4Qr/iuJOG87gF00z7+/VTHiVw0f0K0qpsSs3e5IiO522phZNp3IAwczdyMo80eHwn4I3HZpCo2r2NxMr8q9Ww3/q2djZZI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=12LFbh/f; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="12LFbh/f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 821B3C4CECE; Thu, 12 Dec 2024 16:43:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1734021791; bh=VrABIsGvxrppnCXsUsL8GoyoNp7ft1DtBAV8yPH9+/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=12LFbh/fxjj/itb2LutJ+D8J02EyT2GEPTdVzVT+d4Rgi8gpCWZFMXsvgDTaIrQbl avoraSARjmBZzfAJ1OkFfygatoXYRa5mwV/LOsUtFNS9UHfOARPm7R8Z/FV7WtU/G/ c8pG17/nlU2//tljOwbdJPqfkMNCJ4TbQIjW8tOY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kurt Borja , Mario Limonciello , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Hans de Goede , Sasha Levin Subject: [PATCH 5.15 064/565] platform/x86: dell-wmi-base: Handle META key Lock/Unlock events Date: Thu, 12 Dec 2024 15:54:19 +0100 Message-ID: <20241212144314.023582797@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241212144311.432886635@linuxfoundation.org> References: <20241212144311.432886635@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kurt Borja [ Upstream commit ec61f0bb4feec3345626a2b93b970b6719743997 ] Some Alienware devices have a key that locks/unlocks the Meta key. This key triggers a WMI event that should be ignored by the kernel, as it's handled by internally the firmware. There is no known way of changing this default behavior. The firmware would lock/unlock the Meta key, regardless of how the event is handled. Tested on an Alienware x15 R1. Signed-off-by: Kurt Borja Reviewed-by: Mario Limonciello Acked-by: Pali Rohár Link: https://lore.kernel.org/r/20241031154441.6663-2-kuurtb@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sasha Levin --- drivers/platform/x86/dell/dell-wmi-base.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/platform/x86/dell/dell-wmi-base.c b/drivers/platform/x86/dell/dell-wmi-base.c index b12e6ebd10dd6..c853b429b9d73 100644 --- a/drivers/platform/x86/dell/dell-wmi-base.c +++ b/drivers/platform/x86/dell/dell-wmi-base.c @@ -79,6 +79,12 @@ static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = { static const struct key_entry dell_wmi_keymap_type_0000[] = { { KE_IGNORE, 0x003a, { KEY_CAPSLOCK } }, + /* Meta key lock */ + { KE_IGNORE, 0xe000, { KEY_RIGHTMETA } }, + + /* Meta key unlock */ + { KE_IGNORE, 0xe001, { KEY_RIGHTMETA } }, + /* Key code is followed by brightness level */ { KE_KEY, 0xe005, { KEY_BRIGHTNESSDOWN } }, { KE_KEY, 0xe006, { KEY_BRIGHTNESSUP } }, -- 2.43.0