mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Cemin <dcemin@nvidia.com>
To: hansg@kernel.org, ilpo.jarvinen@linux.intel.com, W_Armin@gmx.de
Cc: mpearson-lenovo@squebb.ca, derekjohn.clark@gmail.com,
	xy-jackie@139.com, ikepanhc@gmail.com,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, ldemarchi@nvidia.com
Subject: [RFC PATCH 3/3] platform/x86: ideapad-laptop: do not bind the WMI event devices without the VPC
Date: Fri, 13 Nov 2026 14:27:55 -0800	[thread overview]
Message-ID: <20261113222755.1696567-4-dcemin@nvidia.com> (raw)
In-Reply-To: <20261113222755.1696567-1-dcemin@nvidia.com>

ideapad-laptop binds the Fn key and Esc WMI event GUIDs unconditionally,
but ideapad_wmi_notify() only acts when the VPC platform driver has
probed and set ideapad_shared. On machines that expose the WMI GUIDs
without the IdeaPad VPC device (VPC2004) the driver claims the WMI
device and then drops every event.

Decline the WMI devices when there is no VPC2004, so the device stays
free for a consumer that can report the events, such as the Lenovo WMI
hotkeys driver.

Signed-off-by: David Cemin <dcemin@nvidia.com>
---
 drivers/platform/x86/lenovo/ideapad-laptop.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
index 91a8d11c79c5..44ae248c5a4d 100644
--- a/drivers/platform/x86/lenovo/ideapad-laptop.c
+++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
@@ -2278,6 +2278,14 @@ static int ideapad_wmi_probe(struct wmi_device *wdev, const void *context)
 {
 	struct ideapad_wmi_private *wpriv;
 
+	/*
+	 * The events are only delivered once the VPC platform driver is bound
+	 * (ideapad_shared).  Without the VPC device this driver can never
+	 * report them, so leave the WMI device to another consumer.
+	 */
+	if (!acpi_dev_found("VPC2004"))
+		return -ENODEV;
+
 	wpriv = devm_kzalloc_obj(&wdev->dev, *wpriv);
 	if (!wpriv)
 		return -ENOMEM;
-- 
2.56.1


      parent reply	other threads:[~2026-11-13 22:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 22:27 [RFC PATCH 0/3] platform: lenovo: architecture independent home for the Lenovo WMI drivers David Cemin
2026-11-13 22:27 ` [RFC PATCH 1/3] platform: lenovo: move the architecture independent WMI drivers out of x86 David Cemin
2026-11-13 22:27 ` [RFC PATCH 2/3] platform: lenovo: add WMI hotkeys driver David Cemin
2026-11-13 22:27 ` David Cemin [this message]

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=20261113222755.1696567-4-dcemin@nvidia.com \
    --to=dcemin@nvidia.com \
    --cc=W_Armin@gmx.de \
    --cc=derekjohn.clark@gmail.com \
    --cc=hansg@kernel.org \
    --cc=ikepanhc@gmail.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=ldemarchi@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpearson-lenovo@squebb.ca \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=xy-jackie@139.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®