From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (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 B6A21437451 for ; Mon, 13 Jul 2026 14:31:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783953102; cv=none; b=PzdROsjAZdfiEUgykbjQ6WdCRT9ry3nwuroCaNqfTnk5o2OAN3FZeEzmPaJXYa2/UI8QMgYoXOlVt9E8D/nvOoGJF6cIcfEL0VwCoi7/oJ/qOMsSI4sjKpsYgQxiZLo7vBhIMAkUCfVH7fF6Ndhpl4CkTR5S7FbpOP9YH1wmUAE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783953102; c=relaxed/simple; bh=RjcmqHddOPJFPlXAo7SY94la3yf/PIGdxvDHfx5w/Vo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZvQZn3EVjLEyln4rT6A4RYezpjqQDOHZGIVNbBzNbtRT2OLMd9+GOA0n8PGIObxj2jWAKtTlrMqtDMhvbAKgq0g7VFfTt9FGu7hhsBVU9fjs6OAUmBuiTRvlrOsitqpYSST5RR7cTiNmEmrJjZWHc388+ZqELWE60ZUlV4evh0g= 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=AW1zn/a7; arc=none smtp.client-ip=209.85.222.172 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="AW1zn/a7" Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-92eafc94c9cso211090385a.0 for ; Mon, 13 Jul 2026 07:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783953100; x=1784557900; 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:content-type; bh=5q5PI7NNO6j/SihoDeyAbVWZeOHgS2VkuRW1R2tonY8=; b=AW1zn/a7CVFSm+JlZK6V1Qh0bpItlh5IeI5yw3R9Ta9A0debhQwg9vs/5ZAe0VTTxH DXMXxq05zycQrrslhoQXcX2JzBDxSWFwmOXS8Zdq3MO9APD0zqMhqf5Aneuh+p1K56ex sB2b2Lm0Yy+Uwg2jJO3FriYZ4WwUB3HEOiDkSN9Hmu18uoFzL+t9mFz05E92ENtnyO0p x1hUOqsMlurbQIDi4np6RXoh7fH/mObtVmOts5RLi+KQr6ewr/VgJytFrL9cE0f1MLB1 R7UEwi1tzwxeeKTynsSslYygQ66KAJoOWTiexsziZUgFVFy6R4pLIcMPANFsLNtnc5du GWTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783953100; x=1784557900; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=5q5PI7NNO6j/SihoDeyAbVWZeOHgS2VkuRW1R2tonY8=; b=TRMmQF51AB7lPY1sDzfyGXHSjGj2wEso5R0YCxLrwayZodrMnYUTNkQF5sYH6AWI3C azos9bRhX1vfghNXnA2d5gbvFcTqdYeFfekffejraP7yq573pe5XU2YA0zpPUfeoAj30 9F4boiS+DQeAIxRaWSVJQ9Ib++b++oiy7IufuEXbucUoYjYEbYAWrQxU3jGzz6wus7u/ BTEDtuVi3xn0gt0v4DflldE76VpPiUIKh5zZpa8/NoW+YgljJ0XYi9Qqoj82qUqtY+5A RWz0jQLTmcan8FG2iFH3nx01QL9LDPZhZEX2ibkMUjap5wpjevLKS0Qx41PR+l2cRepH F1PQ== X-Forwarded-Encrypted: i=1; AHgh+RrZiLp/+qkcdGSbWCPHWHb5uyZnBBpDHIoC6tE8Nnwh3Y/bxhYlTFS4JlGmeuLtweD2bYgmIc8BmfniOvI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy2zWV/UghNz+zcCWKS9FMxzQk185kXMGPmVo2jO9qPkksagTLh JmJ1PD9vfUrc8EER5/QXgo+DdW5vCRm1Xq72Fu3IjDbRqM18E6dTtRSN X-Gm-Gg: AfdE7cnKRtK+nTZkkajENLo4dpvQdC805O5Pv1uCsjxCgYrWyusIPjxz7hNYYMNcWUa GGIrPLXIdhfaWsQPjebQslmAK57cU9UVtcmOi8xAgIXZV6M9+ye38pQVbCYAszhXDjdWLc8ufTr oFph0l8KjSY5YDEkGb8i01DpznTuA4Aex7gSael7sP9pZXchlHSqm8lmGD4dEcwHvGDHV/QSM5B +hUtpd5pwcRgb+40cAIgBDXvtgs3LeLcbiCT3Z9eoZMi+x51dM06a2Rl00fcbya3opI+mbk+UsA duxt34THt1nGvlQNjXy3ESoLAhoh16PY9dUm1gq3ctPemohPvukUGMzBovO4ifUEigeqnimvUQP p9YX1pLXZm7+FrB+BIklb7QTSOs6RICqOVC+0KDPMgTM+xOTtf3aQePT2qcNrW7F9l+AZz4hHKK M6GCeDgj/aLiWlHMTKjaYC9m+SYJ2+9Mwb7K/PqxFS5iYW8L+fLBid+kH5vA== X-Received: by 2002:a05:620a:28d2:b0:92e:c117:5ef1 with SMTP id af79cd13be357-92ef2c9c453mr928410485a.93.1783953099373; Mon, 13 Jul 2026 07:31:39 -0700 (PDT) Received: from fedora (pool-100-11-178-145.phlapa.fios.verizon.net. [100.11.178.145]) by smtp.gmail.com with ESMTPSA id af79cd13be357-92ee5d61facsm1085295885a.42.2026.07.13.07.31.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 07:31:39 -0700 (PDT) From: Dave Carey To: platform-driver-x86@vger.kernel.org Cc: ilpo.jarvinen@linux.intel.com, W_Armin@gmx.de, johannes.goede@oss.qualcomm.com, linux-kernel@vger.kernel.org, Dave Carey Subject: [PATCH v12 1/2] platform/x86/lenovo: lenovo-ymc: Suppress probe on Yoga Book 9 14IAH10 Date: Mon, 13 Jul 2026 10:31:31 -0400 Message-ID: <20260713143132.381808-2-carvsdriver@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260713143132.381808-1-carvsdriver@gmail.com> References: <20260713143132.381808-1-carvsdriver@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The Yoga Book 9 14IAH10 (DMI product name "83KJ") has a dedicated yb9-kbdock WMI driver that registers an input device reporting SW_TABLET_MODE to track the detachable Bluetooth keyboard. lenovo-ymc also loads on this machine and creates an input node with the SW_TABLET_MODE capability bit set. For input switches, the presence of the capability bit has semantic meaning: userspace (e.g. GNOME) reads the switch state at startup from every node advertising the capability and does not expect more than one such node. Add a DMI match for the Yoga Book 9 14IAH10 to probe() so that lenovo-ymc returns -ENODEV on this hardware, leaving yb9-kbdock as the sole SW_TABLET_MODE source. The ymc_ec_trigger EC write, the only other action taken in response to a YMC event, is guarded by a separate DMI table that excludes this machine; no other functionality is affected. Signed-off-by: Dave Carey --- drivers/platform/x86/lenovo/ymc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/platform/x86/lenovo/ymc.c b/drivers/platform/x86/lenovo/ymc.c --- a/drivers/platform/x86/lenovo/ymc.c +++ b/drivers/platform/x86/lenovo/ymc.c @@ -23,7 +23,23 @@ module_param(force, bool, 0444); static bool force; module_param(force, bool, 0444); MODULE_PARM_DESC(force, "Force loading on boards without a convertible DMI chassis-type"); +static const struct dmi_system_id lenovo_ymc_nosupport_dmi_table[] = { + { + /* + * Yoga Book 9 14IAH10: SW_TABLET_MODE is reported by the + * yb9-kbdock driver. Suppress lenovo-ymc on this machine to + * avoid userspace seeing two input nodes that both advertise + * the SW_TABLET_MODE capability. + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "83KJ"), + }, + }, + { } +}; + static const struct dmi_system_id allowed_chasis_types_dmi_table[] = { { .matches = { @@ -100,7 +116,10 @@ static int lenovo_ymc_probe(struct wmi_device *wdev, const void *ctx) struct lenovo_ymc_private *priv; struct input_dev *input_dev; int err; + if (dmi_check_system(lenovo_ymc_nosupport_dmi_table)) + return -ENODEV; + if (!dmi_check_system(allowed_chasis_types_dmi_table)) { if (force) dev_info(&wdev->dev, "Force loading Lenovo YMC support\n"); -- 2.54.0