Skip to content

Commit

Permalink
platform/x86: dell: Add new dell-wmi-ddv driver
Browse files Browse the repository at this point in the history
The dell-wmi-ddv driver adds support for reading
the current temperature and ePPID of ACPI batteries
on supported Dell machines.

Since the WMI interface used by this driver does not
do any input validation and thus cannot be used for probing,
the driver depends on the ACPI battery extension machanism
to discover batteries.

The driver also supports a debugfs interface for retrieving
buffers containing fan and thermal sensor information.
Since the meaing of the content of those buffers is currently
unknown, the interface is meant for reverse-engineering and
will likely be replaced with an hwmon interface once the
meaning has been understood.

The driver was tested on a Dell Inspiron 3505.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220927204521.601887-3-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Armin Wolf authored and Hans de Goede committed Nov 16, 2022
1 parent 878a82c commit a77272c
Show file tree
Hide file tree
Showing 7 changed files with 414 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Documentation/ABI/testing/debugfs-dell-wmi-ddv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
What: /sys/kernel/debug/dell-wmi-ddv-<wmi_device_name>/fan_sensor_information
Date: September 2022
KernelVersion: 6.1
Contact: Armin Wolf <W_Armin@gmx.de>
Description:
This file contains the contents of the fan sensor information buffer,
which contains fan sensor entries and a terminating character (0xFF).

Each fan sensor entry consists of three bytes with an unknown meaning,
interested people may use this file for reverse-engineering.

What: /sys/kernel/debug/dell-wmi-ddv-<wmi_device_name>/thermal_sensor_information
Date: September 2022
KernelVersion: 6.1
Contact: Armin Wolf <W_Armin@gmx.de>
Description:
This file contains the contents of the thermal sensor information buffer,
which contains thermal sensor entries and a terminating character (0xFF).

Each thermal sensor entry consists of five bytes with an unknown meaning,
interested people may use this file for reverse-engineering.
7 changes: 7 additions & 0 deletions Documentation/ABI/testing/sysfs-platform-dell-wmi-ddv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
What: /sys/class/power_supply/<battery_name>/eppid
Date: September 2022
KernelVersion: 6.1
Contact: Armin Wolf <W_Armin@gmx.de>
Description:
Reports the Dell ePPID (electronic Dell Piece Part Identification)
of the ACPI battery.
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5851,6 +5851,13 @@ L: Dell.Client.Kernel@dell.com
S: Maintained
F: drivers/platform/x86/dell/dell-wmi-descriptor.c

DELL WMI DDV DRIVER
M: Armin Wolf <W_Armin@gmx.de>
S: Maintained
F: Documentation/ABI/testing/debugfs-dell-wmi-ddv
F: Documentation/ABI/testing/sysfs-platform-dell-wmi-ddv
F: drivers/platform/x86/dell/dell-wmi-ddv.c

DELL WMI SYSMAN DRIVER
M: Divya Bharathi <divya.bharathi@dell.com>
M: Prasanth Ksr <prasanth.ksr@dell.com>
Expand Down
13 changes: 13 additions & 0 deletions drivers/platform/x86/dell/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,19 @@ config DELL_WMI_DESCRIPTOR
default n
depends on ACPI_WMI

config DELL_WMI_DDV
tristate "Dell WMI sensors Support"
default m
depends on ACPI_BATTERY
depends on ACPI_WMI
help
This option adds support for WMI-based sensors like
battery temperature sensors found on some Dell notebooks.
It also supports reading of the battery ePPID.

To compile this drivers as a module, choose M here: the module will
be called dell-wmi-ddv.

config DELL_WMI_LED
tristate "External LED on Dell Business Netbooks"
default m
Expand Down
1 change: 1 addition & 0 deletions drivers/platform/x86/dell/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ dell-wmi-objs := dell-wmi-base.o
dell-wmi-$(CONFIG_DELL_WMI_PRIVACY) += dell-wmi-privacy.o
obj-$(CONFIG_DELL_WMI_AIO) += dell-wmi-aio.o
obj-$(CONFIG_DELL_WMI_DESCRIPTOR) += dell-wmi-descriptor.o
obj-$(CONFIG_DELL_WMI_DDV) += dell-wmi-ddv.o
obj-$(CONFIG_DELL_WMI_LED) += dell-wmi-led.o
obj-$(CONFIG_DELL_WMI_SYSMAN) += dell-wmi-sysman/
Loading

0 comments on commit a77272c

Please sign in to comment.