All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Hans de Goede <hdegoede@redhat.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Sasha Levin <sashal@kernel.org>,
	acpi4asus-user@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org
Subject: [PATCH AUTOSEL 4.9 25/27] platform/x86: asus-nb-wmi: Do not load on Asus T100TA and T200TA
Date: Thu, 14 May 2020 14:55:48 -0400	[thread overview]
Message-ID: <20200514185550.21462-25-sashal@kernel.org> (raw)
In-Reply-To: <20200514185550.21462-1-sashal@kernel.org>

From: Hans de Goede <hdegoede@redhat.com>

[ Upstream commit 3bd12da7f50b8bc191fcb3bab1f55c582234df59 ]

asus-nb-wmi does not add any extra functionality on these Asus
Transformer books. They have detachable keyboards, so the hotkeys are
send through a HID device (and handled by the hid-asus driver) and also
the rfkill functionality is not used on these devices.

Besides not adding any extra functionality, initializing the WMI interface
on these devices actually has a negative side-effect. For some reason
the \_SB.ATKD.INIT() function which asus_wmi_platform_init() calls drives
GPO2 (INT33FC:02) pin 8, which is connected to the front facing webcam LED,
high and there is no (WMI or other) interface to drive this low again
causing the LED to be permanently on, even during suspend.

This commit adds a blacklist of DMI system_ids on which not to load the
asus-nb-wmi and adds these Transformer books to this list. This fixes
the webcam LED being permanently on under Linux.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/asus-nb-wmi.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index 0fd7e40b86a0d..8137aa3437068 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -561,9 +561,33 @@ static struct asus_wmi_driver asus_nb_wmi_driver = {
 	.detect_quirks = asus_nb_wmi_quirks,
 };
 
+static const struct dmi_system_id asus_nb_wmi_blacklist[] __initconst = {
+	{
+		/*
+		 * asus-nb-wm adds no functionality. The T100TA has a detachable
+		 * USB kbd, so no hotkeys and it has no WMI rfkill; and loading
+		 * asus-nb-wm causes the camera LED to turn and _stay_ on.
+		 */
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TA"),
+		},
+	},
+	{
+		/* The Asus T200TA has the same issue as the T100TA */
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T200TA"),
+		},
+	},
+	{} /* Terminating entry */
+};
 
 static int __init asus_nb_wmi_init(void)
 {
+	if (dmi_check_system(asus_nb_wmi_blacklist))
+		return -ENODEV;
+
 	return asus_wmi_register_driver(&asus_nb_wmi_driver);
 }
 
-- 
2.20.1


  parent reply	other threads:[~2020-05-14 18:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 18:55 [PATCH AUTOSEL 4.9 01/27] Makefile: disallow data races on gcc-10 as well Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 02/27] gcc-common.h: Update for GCC 10 Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 03/27] HID: multitouch: add eGalaxTouch P80H84 support Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 04/27] batman-adv: fix batadv_nc_random_weight_tq Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 05/27] batman-adv: Fix refcnt leak in batadv_show_throughput_override Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 06/27] batman-adv: Fix refcnt leak in batadv_store_throughput_override Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 07/27] batman-adv: Fix refcnt leak in batadv_v_ogm_process Sasha Levin
     [not found] ` <20200514185550.21462-1-sashal-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2020-05-14 18:55   ` [PATCH AUTOSEL 4.9 08/27] phy: tegra: Select USB_COMMON for usb_get_maximum_speed() Sasha Levin
2020-05-14 18:55     ` Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 09/27] configfs: fix config_item refcnt leak in configfs_rmdir() Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 10/27] bnxt_en: Fix VLAN acceleration handling in bnxt_fix_features() Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 11/27] net/sonic: Fix a resource leak in an error handling path in 'jazz_sonic_probe()' Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 12/27] component: Silence bind error on -EPROBE_DEFER Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 13/27] net/mlx5: Fix forced completion access non initialized command entry Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 14/27] net/mlx5: Fix command entry leak in Internal Error State Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 15/27] dp83640: reverse arguments to list_add_tail Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 16/27] soc: qcom: ipa: IPA endpoints Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 17/27] net: ipa: fix a bug in ipa_endpoint_stop() Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 18/27] net: macsec: preserve ingress frame ordering Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 19/27] net: moxa: Fix a potential double 'free_irq()' Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 20/27] gtp: set NLM_F_MULTI flag in gtp_genl_dump_pdp() Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 21/27] net: usb: qmi_wwan: add support for DW5816e Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 22/27] ceph: fix double unlock in handle_cap_export() Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 23/27] net/mlx4_core: Fix use of ENOSPC around mlx4_counter_alloc() Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 24/27] USB: core: Fix misleading driver bug report Sasha Levin
2020-05-14 18:55 ` Sasha Levin [this message]
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 26/27] ARM: futex: Address build warning Sasha Levin
2020-05-14 18:55   ` Sasha Levin
2020-05-14 18:55 ` [PATCH AUTOSEL 4.9 27/27] scripts/decodecode: fix trapping instruction formatting Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200514185550.21462-25-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.