[PATCH v6 0/9] Convert most Dell WMI drivers to use the new buffer-based API

Armin Wolf posted 9 patches 2 days, 18 hours ago
.../wmi/driver-development-guide.rst          |   2 +-
drivers/hwmon/dell-smm-hwmon.c                |  49 ++---
drivers/platform/wmi/core.c                   |  31 +--
drivers/platform/x86/dell/dell-smbios-wmi.c   |  40 ++--
drivers/platform/x86/dell/dell-wmi-base.c     |  60 +++---
drivers/platform/x86/dell/dell-wmi-ddv.c      | 179 +++++++++---------
.../platform/x86/dell/dell-wmi-descriptor.c   | 108 +++++------
drivers/platform/x86/dell/dell-wmi-privacy.c  |  77 ++++----
scripts/mod/file2alias.c                      |  28 ++-
9 files changed, 276 insertions(+), 298 deletions(-)
[PATCH v6 0/9] Convert most Dell WMI drivers to use the new buffer-based API
Posted by Armin Wolf 2 days, 18 hours ago
The new buffer-based WMI API improves the compatibility between
different ACPI firmware implementations by performing marshalling/
unmarshalling of WMI buffers like the original Windows driver.

Convert most Dell WMI drivers to use this new API. This also
removes all ACPI-related code from those drivers because the
new buffer-based WMI API uses abstract WMI buffer objects instead
of ACPI objects.

All drivers have been tested on a Dell Inspiron 3505 and appear
to work normally.

The last three patches contain some misc. cleanups for the WMI
driver core itself. The most important change is a fix for modprobe
to verify any WMI GUID strings from WMI drivers and convert them
to uppercase if necessary. This should fix autoloading for WMI
drivers that use WMI GUID strings with lowercase letters.

The whole series should be applied on the platform drivers tree.

Changes since v5:
- mark pseudo-strings in dell-wmi-descriptor as __nonstring
- rework placement of variables being used with __free()
- use __free() in dell-smm-hwmon
- keep original logic in dell-wmi-base
- add Reviewed-by tags

Changes since v4:
- fix issues found by Sashiko review

Changes since v3:
- rework patches to work with the revised WMI API
- use __free() for cleanup
- add missing includes

Changes since v2:
- add Acked-by tag from Guenter
- rework buffer parsing in dell-wmi-descriptor as suggested by Gergo

Changes since v1:
- do not perform pointer arithmetic on void pointers in dell-smm-hwmon

Armin Wolf (9):
  platform/x86: dell-descriptor: Use new buffer-based WMI API
  platform/x86: dell-privacy: Use new buffer-based WMI API
  platform/x86: dell-smbios-wmi: Use new buffer-based WMI API
  platform/x86: dell-wmi-base: Use new buffer-based WMI API
  platform/x86: dell-ddv: Use new buffer-based WMI API
  hwmon: (dell-smm) Use new buffer-based WMI API
  platform/wmi: Make wmi_bus_class const
  platform/wmi: Make sysfs attributes const
  modpost: Handle malformed WMI GUID strings

 .../wmi/driver-development-guide.rst          |   2 +-
 drivers/hwmon/dell-smm-hwmon.c                |  49 ++---
 drivers/platform/wmi/core.c                   |  31 +--
 drivers/platform/x86/dell/dell-smbios-wmi.c   |  40 ++--
 drivers/platform/x86/dell/dell-wmi-base.c     |  60 +++---
 drivers/platform/x86/dell/dell-wmi-ddv.c      | 179 +++++++++---------
 .../platform/x86/dell/dell-wmi-descriptor.c   | 108 +++++------
 drivers/platform/x86/dell/dell-wmi-privacy.c  |  77 ++++----
 scripts/mod/file2alias.c                      |  28 ++-
 9 files changed, 276 insertions(+), 298 deletions(-)

-- 
2.39.5
Re: [PATCH v6 0/9] Convert most Dell WMI drivers to use the new buffer-based API
Posted by Ilpo Järvinen 1 day, 1 hour ago
On Wed, 10 Jun 2026 22:34:44 +0200, Armin Wolf wrote:

> The new buffer-based WMI API improves the compatibility between
> different ACPI firmware implementations by performing marshalling/
> unmarshalling of WMI buffers like the original Windows driver.
> 
> Convert most Dell WMI drivers to use this new API. This also
> removes all ACPI-related code from those drivers because the
> new buffer-based WMI API uses abstract WMI buffer objects instead
> of ACPI objects.
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/9] platform/x86: dell-descriptor: Use new buffer-based WMI API
      commit: 0f2d6a308210caaa5e0ebf9c085d87f4a2c06bfa
[2/9] platform/x86: dell-privacy: Use new buffer-based WMI API
      commit: 1719340487e63da13f2ac25e488c72737a545772
[3/9] platform/x86: dell-smbios-wmi: Use new buffer-based WMI API
      commit: 6f918e3d95c9b0b4e6a6881692a9b5f9bf0f36b0
[4/9] platform/x86: dell-wmi-base: Use new buffer-based WMI API
      commit: 982b0e683aa3b1d20b1512cde53207ba1c80e22b
[5/9] platform/x86: dell-ddv: Use new buffer-based WMI API
      commit: 7fced293bbd00ee8d20eaf4654849ac9ff332973
[6/9] hwmon: (dell-smm) Use new buffer-based WMI API
      commit: ab1eb37dd63ff3555e4f98918f1bd3498522f765
[7/9] platform/wmi: Make wmi_bus_class const
      commit: b79ad5e8ba5cfda93a83e0cf71d4743829cc9f83
[8/9] platform/wmi: Make sysfs attributes const
      commit: c3cbac4be03d769571f32e7f27241b2c58f722f5
[9/9] modpost: Handle malformed WMI GUID strings
      commit: 3429ae7b2f02a4a6ad40d36ee06641d433d75a1b

--
 i.
Re: [PATCH v6 0/9] Convert most Dell WMI drivers to use the new buffer-based API
Posted by Armin Wolf 22 hours ago
Am 12.06.26 um 15:16 schrieb Ilpo Järvinen:

> On Wed, 10 Jun 2026 22:34:44 +0200, Armin Wolf wrote:
>
>> The new buffer-based WMI API improves the compatibility between
>> different ACPI firmware implementations by performing marshalling/
>> unmarshalling of WMI buffers like the original Windows driver.
>>
>> Convert most Dell WMI drivers to use this new API. This also
>> removes all ACPI-related code from those drivers because the
>> new buffer-based WMI API uses abstract WMI buffer objects instead
>> of ACPI objects.
>>
>> [...]
>
> Thank you for your contribution, it has been applied to my local
> review-ilpo-next branch. Note it will show up in the public
> platform-drivers-x86/review-ilpo-next branch only once I've pushed my
> local branch there, which might take a while.

Thank you, i will send a follow-up patch for the dell-wmi-ddv driver later.

Thanks,
Armin Wolf

>
> The list of commits applied:
> [1/9] platform/x86: dell-descriptor: Use new buffer-based WMI API
>        commit: 0f2d6a308210caaa5e0ebf9c085d87f4a2c06bfa
> [2/9] platform/x86: dell-privacy: Use new buffer-based WMI API
>        commit: 1719340487e63da13f2ac25e488c72737a545772
> [3/9] platform/x86: dell-smbios-wmi: Use new buffer-based WMI API
>        commit: 6f918e3d95c9b0b4e6a6881692a9b5f9bf0f36b0
> [4/9] platform/x86: dell-wmi-base: Use new buffer-based WMI API
>        commit: 982b0e683aa3b1d20b1512cde53207ba1c80e22b
> [5/9] platform/x86: dell-ddv: Use new buffer-based WMI API
>        commit: 7fced293bbd00ee8d20eaf4654849ac9ff332973
> [6/9] hwmon: (dell-smm) Use new buffer-based WMI API
>        commit: ab1eb37dd63ff3555e4f98918f1bd3498522f765
> [7/9] platform/wmi: Make wmi_bus_class const
>        commit: b79ad5e8ba5cfda93a83e0cf71d4743829cc9f83
> [8/9] platform/wmi: Make sysfs attributes const
>        commit: c3cbac4be03d769571f32e7f27241b2c58f722f5
> [9/9] modpost: Handle malformed WMI GUID strings
>        commit: 3429ae7b2f02a4a6ad40d36ee06641d433d75a1b
>
> --
>   i.
>
>