From patchwork Thu Oct 31 15:40:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kurt Borja X-Patchwork-Id: 13858102 X-Patchwork-Delegate: hdegoede@redhat.com Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 152E913342F; Thu, 31 Oct 2024 15:41:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730389312; cv=none; b=k/8OjhqtXmLRgwtzFzrhN/kE+YE6tXaEs3MKLDd53LzYyRPb+F4m329JdPpk/dHHcrtZeQKXx8rov6vr6RJjQqvhU23D9omnIj0GhoCo17+Rr4Zz5SWL6C9coYo29h3ThaQ0fW7bJn2vV/0oeY5507xvnFFdMCloMlRI14LuIe4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730389312; c=relaxed/simple; bh=PmzVfunua11rD3Db47ULrY+vEbNJ2UjH9io9RnmyE9U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LIs46f7LMa7KQCiQK7I9u/DKtjg3KUBLQfaCyhjOa/AzuqSJbny7AT6iZkEeoSDS13VPd36o7o42NDiKcy5zrEan6Wf3MIpKnxKh1WS/eoQQBNo5a5asQHMESJOO9TcswPEicTlZ6jgT5lsgrra+gxSocU5Zeuk5JzAjUJDbQE8= 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=eFKEd740; arc=none smtp.client-ip=209.85.214.178 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="eFKEd740" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-20c767a9c50so10721205ad.1; Thu, 31 Oct 2024 08:41:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730389310; x=1730994110; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GiRYxZ7xEXmSUSt3r1VJDfRar6Dp6i3XxT1Xm8dQUN0=; b=eFKEd740drgrFvnfg3D2Ki4w6uGG7yqllEq5MCq9wU6DTy63Ojwi/2N7cdTR6uQVde 7qm8Qb4NCdMgQ2hnyitpmOPPudNjsNmTOcbmfVGlSKnbyQZ6ZaYQDkvRrkGchIb2YeYC 8+pK/Y2eq9LeQjhaRc4JjBjRcI/AJdpPKxrmoZDEWsBZQDontid+UXIhh6A93DBUJZc0 ytKff9wOcfx//ldKcpqkQBjTc725ZbkgoVfpjEeFeuPMkbrV+NE3rTRg93t48FO18rcM wPsulQgWcEuiai4KMZTOxJZf0GME7TsDPhDw9bQYnOFV+nBMWHJCUhfa9VF2D7/LtfY6 XGcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730389310; x=1730994110; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GiRYxZ7xEXmSUSt3r1VJDfRar6Dp6i3XxT1Xm8dQUN0=; b=KzhdSssCF4NgVPRhVtPKAZjaagvpI7/hZ63B3XnAspLrJQhS6W9blRzLas0F0h7u9G 3O3lkQJwvjR1M3kyyeP8EUURHDKNKx9xT9PCHiuor9WzdioAObaFidJaC8A3UGZdeE4C cmXRYuG9MPUxboLJGqv4efOyPhIkG8hUjAo3NgcWiEuvWP01n4wvuNx5xHARB+FhJvRn 3ugYpozQEsbhlNdJkgv5wq5x1WwYWPEvezv7A8HS2W0QQm7kBzF5UykXe3oy9Y1nMwOi sBy7AGx4GWAKHRP/3NNc9iWmj4OQ5SKTritg5N00myg6pE4xJ1PyMfYe4fAZ3Gd4E4mt ejQg== X-Forwarded-Encrypted: i=1; AJvYcCUxvQ8b71XQ/hTWWZfxp7FHozye1f7L59a8qf89DScNi+JK9KouMVE9JFj3hb1iTnTyC+Wd4NS7Qs+eCLhBl4/UG//6Yw==@vger.kernel.org, AJvYcCXZZvnO5mdoq0V3+HpzhhkIwJjwDn/YSU5bnOqGMNYeKGfrx21W0uHOIJELtn5c/+++g6mL3YfBKQZC55U=@vger.kernel.org X-Gm-Message-State: AOJu0YyC0u9YF9vq0vLaolDC6CF1zUoVdfrR5bSf6KP+s7taJc1QbOwe sFr/tKlmAznWGvaAwft2ujzCK1niPAkQfL8Gww4B37d9gnp3qIKe X-Google-Smtp-Source: AGHT+IFe24WVhIbzOIFz5j56t53mW2JYdH4+Labl9yr5hfQNEx4iRMtdK3HnW32afYHFEhfgIcchFQ== X-Received: by 2002:a17:902:d2d0:b0:20c:e2ff:4a2e with SMTP id d9443c01a7336-2111b00690bmr357795ad.53.1730389310181; Thu, 31 Oct 2024 08:41:50 -0700 (PDT) Received: from localhost.localdomain (host95.181-12-202.telecom.net.ar. [181.12.202.95]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211057c0f11sm10091135ad.200.2024.10.31.08.41.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:41:49 -0700 (PDT) From: Kurt Borja To: kuurtb@gmail.com Cc: Dell.Client.Kernel@dell.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org, pali@kernel.org, platform-driver-x86@vger.kernel.org, w_armin@gmx.de Subject: [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products Date: Thu, 31 Oct 2024 12:40:24 -0300 Message-ID: <20241031154023.6149-2-kuurtb@gmail.com> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fixes the following error: dell_smbios: Unable to run on non-Dell system Which is triggered after dell-wmi driver fails to initialize on Alienware systems, as it depends on dell-smbios. This effectively extends dell-wmi, dell-smbios and dcdbas support to Alienware devices, that might share some features of the SMBIOS intereface calling interface with other Dell products. Tested on an Alienware X15 R1. Signed-off-by: Kurt Borja Reviewed-by: Mario Limonciello Acked-by: Pali Rohár --- v2: - Commit message reflects Alienware devices may not necessarily support the SMBIOS interface - Commit message now has "Tested on" --- drivers/platform/x86/dell/dell-smbios-base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c index 73e41eb69..01c72b91a 100644 --- a/drivers/platform/x86/dell/dell-smbios-base.c +++ b/drivers/platform/x86/dell/dell-smbios-base.c @@ -576,6 +576,7 @@ static int __init dell_smbios_init(void) int ret, wmi, smm; if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) && + !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL) && !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) { pr_err("Unable to run on non-Dell system\n"); return -ENODEV; From patchwork Thu Oct 31 15:44:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kurt Borja X-Patchwork-Id: 13858107 X-Patchwork-Delegate: hdegoede@redhat.com Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 9FF2B1A4F01; Thu, 31 Oct 2024 15:45:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730389523; cv=none; b=PhcVF8iGPwcRi/JJW/7HSgjPOXnQYDUKeugOKck++n+mO3VkqikMnh5bw+oXVGmWVsxHhMYdtZ8ipmDABH0F3mWCzhTYc8R6uScdWmqJeSkO2g3NFuD8ldtYpl1UeC8VGawXH80RuLVep5IIiLfwNUn24UO4BpTo32l0vlhEg/c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730389523; c=relaxed/simple; bh=4asKQz8BlpJNUrdZhQ29gzgZCv2VO5bREGlNaueBoVA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oAJrB5gVpMCHipqBZCIRFPVfbMQdmcLzUW5krUskJ/Xwfwt8bMvZ6gDJCTrrswlAQecgirwDj433Sz4k6CORJOR1pld+5853EunmB6z/o/T8Dg2Q5SWIxBbPjqHy+8d8ut6/WOnZUFYke32s+6dJ3lf8+VWu0WmUmBMdHPESPDo= 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=c8c8Y6EK; arc=none smtp.client-ip=209.85.215.171 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="c8c8Y6EK" Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-7edb6879196so803941a12.3; Thu, 31 Oct 2024 08:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730389521; x=1730994321; 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=NcdrQiXH1Ai25k8tG5sWlTGqXb3UpGbFG/HnKOgIkSs=; b=c8c8Y6EK+FjT4d0VvtZIfbthom8iQAWUtgj4GXKegGOnQOcsD4/fMnRJxnEAhwSkzR Ks5fSh7ZOrFIy/hBQ30+thW03tx/xRjH29E5ITWEKNsrOQ2kV7fTrLuWIwdN9EYwjqbV Jy/424HAGnA1ROnQOZE46yHbeTOUpC2+9elE78BV1Nx3azKDlTco3CoAKKA4Fw232dO6 70IwVu/eKGOzjcXHfwI7p5tyJLHOdg/TfwQHylPXLSANyF2fapjx8ykbWhSAEFJB9tuF COk+Hr45tMQruH92QABJHtESPJaJM4z4YpdwNFnShBZE4TrgDAztOCmXmIJurWUvsdrJ sH9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730389521; x=1730994321; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NcdrQiXH1Ai25k8tG5sWlTGqXb3UpGbFG/HnKOgIkSs=; b=ZkzZ3uqNqdhFiYqlOsctQAS6M5pDtZ68DmICz/ElOecpFHxgMMYQHxGIvQhGmOsMKQ jnMt3TR3SqsfjYauN7X6FuOTrg4ZH+SrPu2gjvhkzgoZv/WETz2KfT+Q4t686g6l6gL5 FoZxfMOVkef4rA4m8WeAVUS1NkpvxovdCwuAmTRWZwfEVc5tAjocWRb0kHCTChNmTfbk t0gSnegXNSjFUUkhQmsCBMzWSNurQsGm18c4OB+KyKx71BxgF3zFQqWXVx9xqQ9HBFT0 zwqdzFJGqz8FcESpniy39TWjaVYQT7gsnrdNP8G5I72RNGtVVHL0VoN1t+QV4MrFRCRd cC4g== X-Forwarded-Encrypted: i=1; AJvYcCWeWthcQAaaw7KCgkRfoKLUDWg0fCDc7Y1fYHmFVtE94F1Dc/3RcIGRS0sfNkB1TE+7RKEZYQuAaz6DJCat26XD3h6pPg==@vger.kernel.org, AJvYcCXyiHbd9JxfmtWTJ1AFpTPkGc7+wQBvvpNNNajPIhji9m3jBLp4tHLYoP9P+gGJWmbiY6OUwfw4T0dAxH4=@vger.kernel.org X-Gm-Message-State: AOJu0YyXCgbQpmeILoJfdKO38RKGX+GJ9x1vhZ3mRqSfhrPSCI0zdwPe vwaa/EOeAL2oRuPh5Pq/2GzeBI3jlCaKZ+hQcVdpQ8t+nzy6IUkB X-Google-Smtp-Source: AGHT+IH4fCkgmP7iojZ/BQoHL465KrlePVvyrnC+kpcoX/EnkLheoMocGoZWzuvJN6fNg6yBkkQiIw== X-Received: by 2002:a17:902:ea0b:b0:20c:f39e:4c15 with SMTP id d9443c01a7336-210c68c6dadmr236555115ad.22.1730389520780; Thu, 31 Oct 2024 08:45:20 -0700 (PDT) Received: from localhost.localdomain (host95.181-12-202.telecom.net.ar. [181.12.202.95]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211057c0a53sm10142465ad.192.2024.10.31.08.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:45:20 -0700 (PDT) From: Kurt Borja To: kuurtb@gmail.com Cc: Dell.Client.Kernel@dell.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org, pali@kernel.org, platform-driver-x86@vger.kernel.org, w_armin@gmx.de Subject: [PATCH v2 2/2] dell-wmi-base: Handle META key Lock/Unlock events Date: Thu, 31 Oct 2024 12:44:42 -0300 Message-ID: <20241031154441.6663-2-kuurtb@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241031154023.6149-2-kuurtb@gmail.com> References: <20241031154023.6149-2-kuurtb@gmail.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- v2: - Fixed entry style - Commit message clarifies firmware behavior - Commit message now has "Tested on" --- 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 502783a7a..ce421e51b 100644 --- a/drivers/platform/x86/dell/dell-wmi-base.c +++ b/drivers/platform/x86/dell/dell-wmi-base.c @@ -80,6 +80,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 } },