platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] platform/x86: dell: Add new dell-wmi-ddv driver
@ 2022-09-12 12:53 Armin Wolf
  2022-09-12 12:53 ` [PATCH 1/5] ACPI: battery: Do not unload battery hooks on single error Armin Wolf
                   ` (4 more replies)
  0 siblings, 5 replies; 26+ messages in thread
From: Armin Wolf @ 2022-09-12 12:53 UTC (permalink / raw)
  To: hdegoede, markgross
  Cc: rafael, lenb, hmh, matan, corentin.chary, jeremy, productdev,
	platform-driver-x86, linux-acpi, linux-kernel

This patch series adds a new driver for a WMI interface found in
many newer Dell machines. This interface allows to read battery
properties like temperature and the ePPID (Dell-specific), while
also providing fan and thermal sensor information.

The interface does support multiple batteries which are indetified
by an "index", which appears to be the batteries ACPI UID. Since
the interface also appears to omit any bounts checking of the
index, the ACPI battery hook mechanism is used to discover batteries.

Since the information returned when querying fan/thermal sensor
information is currently unknown, a debugfs entry is created to
allow for easier reverse engineering. The interface is likely
to be replaced by a proper hwmon interface in the future.

Since the driver can potentially be instantiated mutplie times,
the ACPI battery hook mechanism had to be extended.

The first two patches allow that battery hooks are not unloaded
if they return an error when a battery was added, so that they
can safely return -ENODEV.

The next two patches extend the battery hook mechanism to better
support drivers which can be instantiated mupltible times.

The last patch finally adds the new driver. It was called
dell-wmi-ddv since the interface is called "DDV" by Dell software,
likely meaning "Dell Data Vault".

The driver was tested, together with the changes made to the
ACPI battery driver, on a Dell Inspiron 3505. Other drivers
already using the battery hook mechanism where changed as well,
but could only be compile-tested due to missing hardware.

Armin Wolf (5):
  ACPI: battery: Do not unload battery hooks on single error
  ACPI: battery: Simplify battery_hook_unregister()
  ACPI: battery: Allow battery hooks to be registered multiple times.
  ACPI: battery: Allow for passing data to battery hooks.
  platform/x86: dell: Add new dell-wmi-ddv driver

 .../ABI/testing/debugfs-dell-wmi-ddv          |  21 +
 .../ABI/testing/sysfs-platform-dell-wmi-ddv   |  16 +
 MAINTAINERS                                   |   7 +
 drivers/acpi/battery.c                        |  59 ++-
 drivers/platform/x86/asus-wmi.c               |  20 +-
 drivers/platform/x86/dell/Kconfig             |  13 +
 drivers/platform/x86/dell/Makefile            |   1 +
 drivers/platform/x86/dell/dell-wmi-ddv.c      | 365 ++++++++++++++++++
 drivers/platform/x86/huawei-wmi.c             |  15 +-
 drivers/platform/x86/lg-laptop.c              |  14 +-
 drivers/platform/x86/system76_acpi.c          |  22 +-
 drivers/platform/x86/thinkpad_acpi.c          |  15 +-
 drivers/platform/x86/wmi.c                    |   1 +
 include/acpi/battery.h                        |  12 +-
 14 files changed, 504 insertions(+), 77 deletions(-)
 create mode 100644 Documentation/ABI/testing/debugfs-dell-wmi-ddv
 create mode 100644 Documentation/ABI/testing/sysfs-platform-dell-wmi-ddv
 create mode 100644 drivers/platform/x86/dell/dell-wmi-ddv.c

--
2.30.2


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

end of thread, other threads:[~2022-09-27 15:47 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12 12:53 [PATCH 0/5] platform/x86: dell: Add new dell-wmi-ddv driver Armin Wolf
2022-09-12 12:53 ` [PATCH 1/5] ACPI: battery: Do not unload battery hooks on single error Armin Wolf
2022-09-19 10:42   ` Hans de Goede
2022-09-19 16:27     ` Rafael J. Wysocki
2022-09-19 19:12       ` Armin Wolf
2022-09-19 20:35         ` Armin Wolf
2022-09-27 14:29           ` Hans de Goede
2022-09-27 15:44             ` Armin Wolf
2022-09-12 12:53 ` [PATCH 2/5] ACPI: battery: Simplify battery_hook_unregister() Armin Wolf
2022-09-19 10:42   ` Hans de Goede
2022-09-12 12:53 ` [PATCH 3/5] ACPI: battery: Allow battery hooks to be registered multiple times Armin Wolf
2022-09-12 16:42   ` Barnabás Pőcze
2022-09-12 17:29     ` Armin Wolf
2022-09-19 11:18       ` Hans de Goede
2022-09-19 17:42       ` Barnabás Pőcze
2022-09-12 12:53 ` [PATCH 4/5] ACPI: battery: Allow for passing data to battery hooks Armin Wolf
2022-09-19 11:08   ` Hans de Goede
2022-09-12 12:53 ` [PATCH 5/5] platform/x86: dell: Add new dell-wmi-ddv driver Armin Wolf
2022-09-12 21:56   ` Randy Dunlap
2022-09-13 14:40     ` Armin Wolf
2022-09-13 16:08       ` Limonciello, Mario
2022-09-13 16:45         ` Armin Wolf
2022-09-13 18:27         ` Randy Dunlap
2022-09-13 18:30           ` Limonciello, Mario
2022-09-13 18:37             ` Randy Dunlap
2022-09-19 11:33   ` 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;
as well as URLs for NNTP newsgroup(s).