From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (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 19F603A382F for ; Mon, 8 Jun 2026 21:52:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780955535; cv=none; b=gkIzqkctwCpWYB7onad+zg6NmFFcW9fjC8fvtJ537xnEunQNCvRmAoORFh10icR2l+c2bM6nMS4z+U1YQ0Z16hkjKckTWrhbrd1yWFiVuuFLGYQHhMc2pLx/RFLFn2HJ2N2i4C1biqPtzOr+lZ3JtZTRDGeiKXza9Gm3SVYB9Lw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780955535; c=relaxed/simple; bh=RjcmqHddOPJFPlXAo7SY94la3yf/PIGdxvDHfx5w/Vo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eyyiBKc5IcM+wwRUaLkSt5pnZC6kGp8P3rzaY1XHQB6aATZpyDCngj1QN1bYXodnPph9joVPtaHEU9aZWG5gGH83Jug0jjpU9tbdkpWMkUy8nA6ZQqBiDdjBLtjAcn73LRWXuWO5FE85ffH6vj7QfckCcJlcnONdQU605cME53Y= 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=Qd958M3g; arc=none smtp.client-ip=209.85.160.170 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="Qd958M3g" Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-51776b4de37so39267801cf.1 for ; Mon, 08 Jun 2026 14:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780955533; x=1781560333; 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=5q5PI7NNO6j/SihoDeyAbVWZeOHgS2VkuRW1R2tonY8=; b=Qd958M3g3h07DQisPbPl12ksNRKxRLOEk/rld7LRjMdhrI14YhrGSwijUEH1DowVYn x2M+/bA/O+fxYhQ+XeauhFdXs2v7RzHmwNfqQqg083z+Wp20Qo/ZuGhmRCLahhEr7q58 NemN19GSrfvqUZFNJe/vu2Mwdz7dzbhe7/0rx/s9FVRDRhM8kb7z8U0LzWsJHwinRd6n /fkfJwSb7m8jFktyc+iLCXLIYc4gPknD724cdNdG+3hkSaIiAcDq9bm/KVIbcF6S7WRW s2nhChOCuWH1o4bMn+LLqZMxM4mrgpa9yT8dmekUWgKEvpgdhKFe8QXHYwVH3vmaPnPj RB9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780955533; x=1781560333; 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; bh=5q5PI7NNO6j/SihoDeyAbVWZeOHgS2VkuRW1R2tonY8=; b=AvzYWzApFlPN0I4abzylhizZlonomkkVqTSBGZun93XmfC6lpi10RprOrS/ECYfR3R TXlRl5jQZrosg5iQ5VcRnDjSoP5XxR+oGXkjo5cM07rx9ZXYazFTX2qUC4RCp4+ouN3X IDMIzbeTX56nMq8ylYurZXAmjWB2MJo0KUZdJo9r3XKZQDDLpUdQNXitZc/ciNhZ1NUA nyNb+c8wwXXSnxHOBgBhYHIFnR3Xy1JmNU8ULJv2wjv58jvx0GAC8rfscBLVl3PfTktl 2JpqPKOc8Le5YC1uEUoO2bxl6hWt3tMFtxlw12Iq6Iog+KsOloUPTpb7Q8VdOdjMlfq5 E1Wg== X-Forwarded-Encrypted: i=1; AFNElJ+hytUEQTZTSFNWg4KdSCYIbySZIKA0e/YVhBmcjY7Z6M+PwsuL6RY3wkfZ2nQhLSb44ewPEutuQYJ2xLQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzU8EAtD6uSsd+FAn5BX91Whd9j7oLHhIQSAyp/fHBFf3zZxfdn AVJXdev2EwlcBDIgOjkby3nNCDt9qzuoWHMQyV1y9Y/A0NmbbSC5isv+ X-Gm-Gg: Acq92OGbTH88tBEW/Elis3o8HOeWpIzrIkjogw2sljV+NPmVVPkw5e6kSakp5ns7AZ3 gK3LYljnRi05jyNlYRNI5O+SbkNmELmaYjcrzCTzlfa/85rt8U5wy+6SBOhtoN+QKEIiDSYUvMA Axa7SdiNxJn5h5b6FB/mA8uniCJXbgBtRz64eKr9CI9oIvW+IWdY+pYU4d2EMurFwOeaSc0QQXm l/sXZwVZ/DGOpzlFJGMLpGngugJXBPCPGITzel5IoDamfgiss5Z+kHLYAzPdTfbx5WAE39/eBnC StGlrmRjOxjLk6aQP5pZEmxiwtK4TjWYt0i0JeNk7NQDR1dAhAWZQ4wWjWmWXr3ycxbBhNGg/fR YEcPeLh/emSn6upETlsjOs8kucdsd5fIcau2FzkCVlIDRiJeceC9Fvy/C5pfjHfIqXpe5Uu83fo yyq2RWFRrfTQHd4j0FiCrTtOq9C7MwJKIt+DwxMLKbpXOHfGQq49iIp4FsXzu36dirGV4r4bHFy +4n5pU= X-Received: by 2002:a05:622a:4c0a:b0:517:5d30:3c44 with SMTP id d75a77b69052e-51795bccdd5mr246929491cf.38.1780955533057; Mon, 08 Jun 2026 14:52:13 -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 d75a77b69052e-51775e27cc7sm165003741cf.29.2026.06.08.14.52.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2026 14:52:12 -0700 (PDT) From: Dave Carey To: platform-driver-x86@vger.kernel.org Cc: johannes.goede@oss.qualcomm.com, mpearson-lenovo@squebb.ca, ilpo.jarvinen@linux.intel.com, armin.wolf@outlook.de, linux-kernel@vger.kernel.org, Dave Carey Subject: [PATCH v6 1/2] platform/x86/lenovo: lenovo-ymc: Suppress probe on Yoga Book 9 14IAH10 Date: Mon, 8 Jun 2026 17:52:04 -0400 Message-ID: <20260608215205.678182-2-carvsdriver@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260608215205.678182-1-carvsdriver@gmail.com> References: <73c27728-2f07-41c1-82c7-fd6f46c89f3c@oss.qualcomm.com> <20260608215205.678182-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