public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] platform/x86: wmi: Pass event data directly to legacy notify handlers
@ 2024-08-22 17:38 Armin Wolf
  2024-08-22 17:38 ` [PATCH 1/5] " Armin Wolf
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Armin Wolf @ 2024-08-22 17:38 UTC (permalink / raw)
  To: james, jlee, corentin.chary, luke, matan, coproscefalo
  Cc: hdegoede, ilpo.jarvinen, rafael, lenb, platform-driver-x86,
	linux-hwmon, linux-acpi, linux-kernel

The current legacy WMI handlers are susceptible to picking up wrong
WMI event data on systems where different WMI devices share some
notification IDs.

Prevent this by letting the WMI driver core taking care of retrieving
the event data. This also simplifies the legacy WMI handlers and their
implementation inside the WMI driver core.

The first patch converts all legacy WMI notify handlers to stop using
wmi_get_event_data() and instead use the new event data provided by
the WMI driver core.
The second patch fixes a minor issue discovered inside the
hp-wmi-sensors driver, and the remaining patches perform some cleanups.

The patch series was tested on a Dell Inspiron 3505 and a Acer Aspire
E1-731 and appears to work.

Armin Wolf (5):
  platform/x86: wmi: Pass event data directly to legacy notify handlers
  hwmon: (hp-wmi-sensors) Check if WMI event data exists
  platform/x86: wmi: Remove wmi_get_event_data()
  platform/x86: wmi: Merge get_event_data() with wmi_get_notify_data()
  platform/x86: wmi: Call both legacy and WMI driver notify handlers

 drivers/hwmon/hp-wmi-sensors.c           |  20 +---
 drivers/platform/x86/acer-wmi.c          |  16 +--
 drivers/platform/x86/asus-wmi.c          |  19 +--
 drivers/platform/x86/dell/dell-wmi-aio.c |  13 +--
 drivers/platform/x86/hp/hp-wmi.c         |  16 +--
 drivers/platform/x86/huawei-wmi.c        |  14 +--
 drivers/platform/x86/lg-laptop.c         |  13 +--
 drivers/platform/x86/msi-wmi.c           |  20 +---
 drivers/platform/x86/toshiba-wmi.c       |  15 +--
 drivers/platform/x86/wmi.c               | 143 ++++++-----------------
 include/linux/acpi.h                     |   3 +-
 11 files changed, 53 insertions(+), 239 deletions(-)

--
2.39.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-08-27 22:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-22 17:38 [PATCH 0/5] platform/x86: wmi: Pass event data directly to legacy notify handlers Armin Wolf
2024-08-22 17:38 ` [PATCH 1/5] " Armin Wolf
2024-08-27  8:32   ` Ilpo Järvinen
2024-08-22 17:38 ` [PATCH 2/5] hwmon: (hp-wmi-sensors) Check if WMI event data exists Armin Wolf
2024-08-23  5:57   ` James Seo
2024-08-23  6:03   ` Guenter Roeck
2024-08-27  8:20   ` Ilpo Järvinen
2024-08-27 22:11     ` Armin Wolf
2024-08-22 17:38 ` [PATCH 3/5] platform/x86: wmi: Remove wmi_get_event_data() Armin Wolf
2024-08-27  8:33   ` Ilpo Järvinen
2024-08-22 17:38 ` [PATCH 4/5] platform/x86: wmi: Merge get_event_data() with wmi_get_notify_data() Armin Wolf
2024-08-27  8:36   ` Ilpo Järvinen
2024-08-22 17:38 ` [PATCH 5/5] platform/x86: wmi: Call both legacy and WMI driver notify handlers Armin Wolf
2024-08-22 18:04 ` [PATCH 0/5] platform/x86: wmi: Pass event data directly to legacy " Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox