platform: dell: Move out of x86 and support Dell XPS 16 Creator Edition
Subsystems (17)
v2 cover platform: dell: Move out of x86 and support Dell XPS 16 Creator Edition
The Dell XPS 16 Creator Edition (DX16263) is an ARM64 laptop based on NVIDIA RTX Spark. Its firmware exposes the same ACPI-WMI and SMBIOS interfaces as Dell's x86 laptops, so existing Dell platform drivers apply to it as-is. Today, they live under drivers/platform/x86/ and are gated on X86_PLATFORM_DEVICES, so they can't be enabled on ARM64.
This series moves the Dell drivers to drivers/platform/dell/, makes the ones that work there available on ARM64, and works around some firmware quirks found on the Dell XPS 16 Creator Edition.
Patch 1 makes DELL_UART_BACKLIGHT depend on X86 before the move. The driver relies on the DELL0501 handling in acpi_quirk_skip_serdev_enumeration(), which only exists in drivers/acpi/x86/utils.c, and on drivers/platform/x86/serdev_helpers.h. Without that quirk, no serdev controller or platform device is created, so the driver wouldn't work on other architectures.
Patch 2 fixes pre-existing kernel-doc warnings in dcdbas, which the kernel test robot reported as new against v1 because of the rename.
Patches 3-4 move the drivers to drivers/platform/dell/, rename X86_PLATFORM_DRIVERS_DELL to DELL_PLATFORMS (keeping the old symbol as a transitional config so existing .configs carry over), and add a MAINTAINERS entry for the new directory. The per-driver MAINTAINERS entries are updated to the new paths. DCDBAS, DELL_RBU and DELL_SMBIOS_SMM keep their X86 dependency.
Patches 5-6 make DELL_LAPTOP buildable without SERIO_I8042. Patch 5 compiles out dell-laptop's i8042 usage (the touchpad LED and the rfkill event fallback) when SERIO_I8042 is disabled. When neither dell-rbtn nor i8042 is available, it skips rfkill instead of failing to load. Patch 6 then relaxes the dependency to SERIO_I8042 || SERIO_I8042 = n.
Patch 7 fixes dell-smbios-wmi probe on the XPS 16 Creator Edition. The current driver only accepts the misc BIOS flags structure (SMBIOS type 0xB1) at handle 0xB100, but the XPS 16 Creator Edition firmware numbers its handles differently. The handle value is irrelevant, so match on the type only.
Patches 8-10 handle a firmware problem on the same machine: the SMBIOS calling interface completes every request to the Dell-proprietary interface with all zeroes, even for requests that should fail. As a result, dell-laptop reports bogus battery charge modes and thresholds and registers mic mute/mute LEDs that do nothing, and dell-pc fails with "platform_profile probe failed". Patch 8 adds a DMI quirk list and exports dell_smbios_calls_functional(). Patches 9-10 make dell-laptop and dell-pc refuse to load on affected platforms. dell-smbios itself still loads, since dell-wmi depends on it.
Testing done:
- Build-tested x86-64 and arm64 with all Dell platform drivers enabled.
- Build-tested x86-64 with SERIO_I8042 disabled.
- Runtime-tested on Dell XPS 16 Creator Edition. Mic mute key is working.
Need help testing:
- x86 Dell laptops/desktops for regressions.
Outstanding issues (outside of this series):
- When spamming the keyboard backlight key, then pressing the mic mute key, the mic mute event is spammed. This is a multi-part issue between the EC and DSDT. I have a DSDT patch to fix this. I will be working with Dell to get it resolved.
- When the dell-wmi driver is not loaded and the keyboard backlight button is spammed, it will eventually stop working and FF-A notifications stop firing. This is likely an issue with the EC's event queue filling up and not notifying anymore after being full (since there's no consumers). I will be working with Dell to get this resolved too.
Changes in v2:
- New patch 2: add missing kernel-doc parameter descriptions to dcdbas. These W=1 warnings predate the series, but the kernel test robot reported them against the move in v1 because the path changed.
- New patch 5: compile out dell-laptop's i8042 usage (touchpad LED and rfkill event fallback) when SERIO_I8042 is disabled, and skip rfkill instead of failing to probe when neither dell-rbtn nor i8042 is available on Latitude and Precision models.
- Patch 6: reword the commit message. The dependency can now be optional because of patch 5. No code changes.
- Patch 7: drop the special handling of handle 0xB100 and match on SMBIOS type 0xB1 only.
v1: https://lore.kernel.org/lkml/[email protected]/T/#u
Brian Mak (10):
platform/x86: dell: Make uart-backlight x86 only platform/x86: dell: dcdbas: Add missing kernel-doc descriptions
platform: dell: Move out of x86 directory
MAINTAINERS: Add Dell platform drivers entry
platform: dell: laptop: Compile out i8042 usage without SERIO_I8042
platform: dell: Allow DELL_LAPTOP to be arch-independent
platform: dell: smbios-wmi: Fix probe on RTX Spark
platform: dell: smbios: Add quirk for non-functional calling interface
platform: dell: laptop: Don't load if SMBIOS calls are non-functional
platform: dell: pc: Don't load if SMBIOS calls are non-functional
.../admin-guide/laptops/alienware-wmi.rst | 4 +--
MAINTAINERS | 36 +++++++++++--------
drivers/platform/Kconfig | 2 ++
drivers/platform/Makefile | 1 +
drivers/platform/{x86 => }/dell/Kconfig | 21 +++++++----
drivers/platform/{x86 => }/dell/Makefile | 4 +--
.../{x86 => }/dell/alienware-wmi-base.c | 0
.../{x86 => }/dell/alienware-wmi-legacy.c | 0
.../{x86 => }/dell/alienware-wmi-wmax.c | 0
.../platform/{x86 => }/dell/alienware-wmi.h | 0
drivers/platform/{x86 => }/dell/dcdbas.c | 11 +++++-
drivers/platform/{x86 => }/dell/dcdbas.h | 0
.../{x86 => }/dell/dell-dw5826e-reset.c | 0
drivers/platform/{x86 => }/dell/dell-laptop.c | 23 +++++++++---
.../platform/{x86 => }/dell/dell-lis3lv02d.c | 0
drivers/platform/{x86 => }/dell/dell-pc.c | 3 ++
drivers/platform/{x86 => }/dell/dell-rbtn.c | 0
drivers/platform/{x86 => }/dell/dell-rbtn.h | 0
.../{x86 => }/dell/dell-smbios-base.c | 22 ++++++++++++
.../platform/{x86 => }/dell/dell-smbios-smm.c | 0
.../platform/{x86 => }/dell/dell-smbios-wmi.c | 2 --
drivers/platform/{x86 => }/dell/dell-smbios.h | 1 +
.../{x86 => }/dell/dell-smo8800-ids.h | 0
.../platform/{x86 => }/dell/dell-smo8800.c | 0
.../{x86 => }/dell/dell-uart-backlight.c | 2 +-
.../platform/{x86 => }/dell/dell-wmi-aio.c | 0
.../platform/{x86 => }/dell/dell-wmi-base.c | 0
.../platform/{x86 => }/dell/dell-wmi-ddv.c | 0
.../{x86 => }/dell/dell-wmi-descriptor.c | 0
.../{x86 => }/dell/dell-wmi-descriptor.h | 0
.../platform/{x86 => }/dell/dell-wmi-led.c | 0
.../{x86 => }/dell/dell-wmi-privacy.c | 0
.../{x86 => }/dell/dell-wmi-privacy.h | 0
.../{x86 => }/dell/dell-wmi-sysman/Makefile | 0
.../dell/dell-wmi-sysman/biosattr-interface.c | 0
.../dell/dell-wmi-sysman/dell-wmi-sysman.h | 0
.../dell/dell-wmi-sysman/enum-attributes.c | 0
.../dell/dell-wmi-sysman/int-attributes.c | 0
.../dell/dell-wmi-sysman/passobj-attributes.c | 0
.../dell-wmi-sysman/passwordattr-interface.c | 0
.../dell/dell-wmi-sysman/string-attributes.c | 0
.../{x86 => }/dell/dell-wmi-sysman/sysman.c | 0
drivers/platform/{x86 => }/dell/dell_rbu.c | 0
drivers/platform/x86/Kconfig | 2 --
drivers/platform/x86/Makefile | 3 --
.../x86/dell-uart-backlight-emulator/README | 4 +--
46 files changed, 100 insertions(+), 41 deletions(-)
rename drivers/platform/{x86 => }/dell/Kconfig (95%)
rename drivers/platform/{x86 => }/dell/Makefile (93%)
rename drivers/platform/{x86 => }/dell/alienware-wmi-base.c (100%)
rename drivers/platform/{x86 => }/dell/alienware-wmi-legacy.c (100%)
rename drivers/platform/{x86 => }/dell/alienware-wmi-wmax.c (100%)
rename drivers/platform/{x86 => }/dell/alienware-wmi.h (100%)
rename drivers/platform/{x86 => }/dell/dcdbas.c (97%)
rename drivers/platform/{x86 => }/dell/dcdbas.h (100%)
rename drivers/platform/{x86 => }/dell/dell-dw5826e-reset.c (100%)
rename drivers/platform/{x86 => }/dell/dell-laptop.c (99%)
rename drivers/platform/{x86 => }/dell/dell-lis3lv02d.c (100%)
rename drivers/platform/{x86 => }/dell/dell-pc.c (99%)
rename drivers/platform/{x86 => }/dell/dell-rbtn.c (100%)
rename drivers/platform/{x86 => }/dell/dell-rbtn.h (100%)
rename drivers/platform/{x86 => }/dell/dell-smbios-base.c (97%)
rename drivers/platform/{x86 => }/dell/dell-smbios-smm.c (100%)
rename drivers/platform/{x86 => }/dell/dell-smbios-wmi.c (99%)
rename drivers/platform/{x86 => }/dell/dell-smbios.h (98%)
rename drivers/platform/{x86 => }/dell/dell-smo8800-ids.h (100%)
rename drivers/platform/{x86 => }/dell/dell-smo8800.c (100%)
rename drivers/platform/{x86 => }/dell/dell-uart-backlight.c (99%)
rename drivers/platform/{x86 => }/dell/dell-wmi-aio.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-base.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-ddv.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-descriptor.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-descriptor.h (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-led.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-privacy.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-privacy.h (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/Makefile (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/biosattr-interface.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/dell-wmi-sysman.h (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/enum-attributes.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/int-attributes.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/passobj-attributes.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/passwordattr-interface.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/string-attributes.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/sysman.c (100%)
rename drivers/platform/{x86 => }/dell/dell_rbu.c (100%)base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
Signature · 1 line
2.53.0
PATCH v2 1/10 platform/x86: dell: Make uart-backlight x86 only
Make dell-uart-backlight x86 only, as it uses some x86 helpers.
--- drivers/platform/x86/dell/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/dell/Kconfig +1 -0
@@ -188,6 +188,7 @@ config DELL_UART_BACKLIGHT depends on ACPI_VIDEO depends on BACKLIGHT_CLASS_DEVICE depends on SERIAL_DEV_BUS + depends on X86 help Say Y here if you want to support Dell AIO UART backlight interface. The Dell AIO machines released after 2017 come with a UART interface
Signature · 1 line
2.53.0
PATCH v2 2/10 platform/x86: dell: dcdbas: Add missing kernel-doc descriptions
In reply to Brian MakSeveral kernel-doc comments in dcdbas are missing descriptions for their function parameters, which causes kernel-doc warnings in W=1 builds:
function parameter 'size' not described in 'smi_data_buf_realloc' function parameter 'smi_cmd' not described in 'dcdbas_smi_request' function parameter 'dev' not described in 'smi_request_store'
...
function parameter 'nb' not described in 'dcdbas_reboot_notify'
Add the missing parameter descriptions and a short description for smi_request_store(), which had none.
--- drivers/platform/x86/dell/dcdbas.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/platform/x86/dell/dcdbas.c +10 -1
@@ -99,6 +99,7 @@ static void smi_data_buf_free(void)/** * smi_data_buf_realloc: grow SMI data buffer if needed +* @size: minimum required buffer size in bytes */ static int smi_data_buf_realloc (unsigned long size) {
@@ -278,6 +279,7 @@ static int raise_smi(void *par) }/** * dcdbas_smi_request: generate SMI request +* @smi_cmd: SMI command to issue * * Called with smi_data_lock. */
@@ -301,7 +303,11 @@ int dcdbas_smi_request(struct smi_cmd *smi_cmd)EXPORT_SYMBOL (dcdbas_smi_request);/** -* smi_request_store: +* smi_request_store: handle a write to the smi_request sysfs attribute +* @dev: device the attribute belongs to +* @attr: device attribute being written +* @buf: value written by userspace +* @count: number of bytes in @buf * * The valid values are: * 0: zero SMI data buffer
@@ -610,6 +616,9 @@ static int dcdbas_check_wsmt(void)/** * dcdbas_reboot_notify: handle reboot notification for host control +* @nb: notifier block +* @code: reboot event (SYS_DOWN, SYS_HALT or SYS_POWER_OFF) +* @unused: unused */ static int dcdbas_reboot_notify (struct notifier_block *nb,unsigned long code,void *unused)
Signature · 1 line
2.53.0
PATCH v2 3/10 platform: dell: Move out of x86 directory
In reply to Brian MakWith the introduction of the Dell XPS 16 Creator Edition, Dell platform drivers are no longer just applicable to x86, but also ARM64. Move Dell platform drivers out of the x86 directory, so they can be reused for ARM64.
Rename CONFIG_X86_PLATFORM_DRIVERS_DELL to CONFIG_DELL_PLATFORMS, and add a transitional config.
---
.../admin-guide/laptops/alienware-wmi.rst | 4 +--
MAINTAINERS | 30 +++++++++----------
drivers/platform/Kconfig | 2 ++
drivers/platform/Makefile | 1 +
drivers/platform/{x86 => }/dell/Kconfig | 18 +++++++----
drivers/platform/{x86 => }/dell/Makefile | 4 +--
.../{x86 => }/dell/alienware-wmi-base.c | 0
.../{x86 => }/dell/alienware-wmi-legacy.c | 0
.../{x86 => }/dell/alienware-wmi-wmax.c | 0
.../platform/{x86 => }/dell/alienware-wmi.h | 0
drivers/platform/{x86 => }/dell/dcdbas.c | 0
drivers/platform/{x86 => }/dell/dcdbas.h | 0
.../{x86 => }/dell/dell-dw5826e-reset.c | 0
drivers/platform/{x86 => }/dell/dell-laptop.c | 0
.../platform/{x86 => }/dell/dell-lis3lv02d.c | 0
drivers/platform/{x86 => }/dell/dell-pc.c | 0
drivers/platform/{x86 => }/dell/dell-rbtn.c | 0
drivers/platform/{x86 => }/dell/dell-rbtn.h | 0
.../{x86 => }/dell/dell-smbios-base.c | 0
.../platform/{x86 => }/dell/dell-smbios-smm.c | 0
.../platform/{x86 => }/dell/dell-smbios-wmi.c | 0
drivers/platform/{x86 => }/dell/dell-smbios.h | 0
.../{x86 => }/dell/dell-smo8800-ids.h | 0
.../platform/{x86 => }/dell/dell-smo8800.c | 0
.../{x86 => }/dell/dell-uart-backlight.c | 2 +-
.../platform/{x86 => }/dell/dell-wmi-aio.c | 0
.../platform/{x86 => }/dell/dell-wmi-base.c | 0
.../platform/{x86 => }/dell/dell-wmi-ddv.c | 0
.../{x86 => }/dell/dell-wmi-descriptor.c | 0
.../{x86 => }/dell/dell-wmi-descriptor.h | 0
.../platform/{x86 => }/dell/dell-wmi-led.c | 0
.../{x86 => }/dell/dell-wmi-privacy.c | 0
.../{x86 => }/dell/dell-wmi-privacy.h | 0
.../{x86 => }/dell/dell-wmi-sysman/Makefile | 0
.../dell/dell-wmi-sysman/biosattr-interface.c | 0
.../dell/dell-wmi-sysman/dell-wmi-sysman.h | 0
.../dell/dell-wmi-sysman/enum-attributes.c | 0
.../dell/dell-wmi-sysman/int-attributes.c | 0
.../dell/dell-wmi-sysman/passobj-attributes.c | 0
.../dell-wmi-sysman/passwordattr-interface.c | 0
.../dell/dell-wmi-sysman/string-attributes.c | 0
.../{x86 => }/dell/dell-wmi-sysman/sysman.c | 0
drivers/platform/{x86 => }/dell/dell_rbu.c | 0
drivers/platform/x86/Kconfig | 2 --
drivers/platform/x86/Makefile | 3 --
.../x86/dell-uart-backlight-emulator/README | 4 +--
46 files changed, 37 insertions(+), 33 deletions(-)
rename drivers/platform/{x86 => }/dell/Kconfig (96%)
rename drivers/platform/{x86 => }/dell/Makefile (93%)
rename drivers/platform/{x86 => }/dell/alienware-wmi-base.c (100%)
rename drivers/platform/{x86 => }/dell/alienware-wmi-legacy.c (100%)
rename drivers/platform/{x86 => }/dell/alienware-wmi-wmax.c (100%)
rename drivers/platform/{x86 => }/dell/alienware-wmi.h (100%)
rename drivers/platform/{x86 => }/dell/dcdbas.c (100%)
rename drivers/platform/{x86 => }/dell/dcdbas.h (100%)
rename drivers/platform/{x86 => }/dell/dell-dw5826e-reset.c (100%)
rename drivers/platform/{x86 => }/dell/dell-laptop.c (100%)
rename drivers/platform/{x86 => }/dell/dell-lis3lv02d.c (100%)
rename drivers/platform/{x86 => }/dell/dell-pc.c (100%)
rename drivers/platform/{x86 => }/dell/dell-rbtn.c (100%)
rename drivers/platform/{x86 => }/dell/dell-rbtn.h (100%)
rename drivers/platform/{x86 => }/dell/dell-smbios-base.c (100%)
rename drivers/platform/{x86 => }/dell/dell-smbios-smm.c (100%)
rename drivers/platform/{x86 => }/dell/dell-smbios-wmi.c (100%)
rename drivers/platform/{x86 => }/dell/dell-smbios.h (100%)
rename drivers/platform/{x86 => }/dell/dell-smo8800-ids.h (100%)
rename drivers/platform/{x86 => }/dell/dell-smo8800.c (100%)
rename drivers/platform/{x86 => }/dell/dell-uart-backlight.c (99%)
rename drivers/platform/{x86 => }/dell/dell-wmi-aio.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-base.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-ddv.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-descriptor.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-descriptor.h (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-led.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-privacy.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-privacy.h (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/Makefile (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/biosattr-interface.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/dell-wmi-sysman.h (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/enum-attributes.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/int-attributes.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/passobj-attributes.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/passwordattr-interface.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/string-attributes.c (100%)
rename drivers/platform/{x86 => }/dell/dell-wmi-sysman/sysman.c (100%)
rename drivers/platform/{x86 => }/dell/dell_rbu.c (100%)Documentation/admin-guide/laptops/alienware-wmi.rst +2 -2
@@ -40,8 +40,8 @@ parameters: If the module loads successfully with these parameters, consider submitting a patch adding your model to the ``awcc_dmi_table`` located in -``drivers/platform/x86/dell/alienware-wmi-wmax.c`` or contacting the maintainer -for further guidance. +``drivers/platform/dell/alienware-wmi-wmax.c`` or contacting the maintainer for +further guidance. Status ------
MAINTAINERS +15 -15
@@ -868,7 +868,7 @@ F: Documentation/ABI/testing/debugfs-alienware-wmi F: Documentation/ABI/testing/sysfs-platform-alienware-wmi F: Documentation/admin-guide/laptops/alienware-wmi.rst F: Documentation/wmi/devices/alienware-wmi.rst -F: drivers/platform/x86/dell/alienware-wmi* +F: drivers/platform/dell/alienware-wmi* ALLEGRO DVT VIDEO IP CORE DRIVER M: Michael Tretter <[email protected]>
@@ -7451,17 +7451,17 @@ M: Matthew Garrett <[email protected]> M: Pali Rohár <[email protected]> L: [email protected] S: Maintained -F: drivers/platform/x86/dell/dell-laptop.c +F: drivers/platform/dell/dell-laptop.c DELL LAPTOP FREEFALL DRIVER M: Pali Rohár <[email protected]> S: Maintained -F: drivers/platform/x86/dell/dell-smo8800.c +F: drivers/platform/dell/dell-smo8800.c DELL LAPTOP RBTN DRIVER M: Pali Rohár <[email protected]> S: Maintained -F: drivers/platform/x86/dell/dell-rbtn.* +F: drivers/platform/dell/dell-rbtn.* DELL LAPTOP SMM DRIVER M: Pali Rohár <[email protected]>
@@ -7474,32 +7474,32 @@ DELL PC DRIVER M: Lyndon Sanche <[email protected]> L: [email protected] S: Maintained -F: drivers/platform/x86/dell/dell-pc.c +F: drivers/platform/dell/dell-pc.c DELL REMOTE BIOS UPDATE DRIVER M: Stuart Hayes <[email protected]> L: [email protected] S: Maintained -F: drivers/platform/x86/dell/dell_rbu.c +F: drivers/platform/dell/dell_rbu.c DELL SMBIOS DRIVER M: Pali Rohár <[email protected]> L: [email protected] L: [email protected] S: Maintained -F: drivers/platform/x86/dell/dell-smbios.* +F: drivers/platform/dell/dell-smbios.* DELL SMBIOS SMM DRIVER L: [email protected] L: [email protected] S: Maintained -F: drivers/platform/x86/dell/dell-smbios-smm.c +F: drivers/platform/dell/dell-smbios-smm.c DELL SMBIOS WMI DRIVER L: [email protected] L: [email protected] S: Maintained -F: drivers/platform/x86/dell/dell-smbios-wmi.c +F: drivers/platform/dell/dell-smbios-wmi.c F: tools/wmi/dell-smbios-example.c DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas)
@@ -7507,7 +7507,7 @@ M: Stuart Hayes <[email protected]> L: [email protected] S: Maintained F: Documentation/userspace-api/dcdbas.rst -F: drivers/platform/x86/dell/dcdbas.* +F: drivers/platform/dell/dcdbas.* DELL WMI DDV DRIVER M: Armin Wolf <[email protected]>
@@ -7515,24 +7515,24 @@ S: Maintained F: Documentation/ABI/testing/debugfs-dell-wmi-ddv F: Documentation/ABI/testing/sysfs-platform-dell-wmi-ddv F: Documentation/wmi/devices/dell-wmi-ddv.rst -F: drivers/platform/x86/dell/dell-wmi-ddv.c +F: drivers/platform/dell/dell-wmi-ddv.c DELL WMI DESCRIPTOR DRIVER L: [email protected] S: Maintained -F: drivers/platform/x86/dell/dell-wmi-descriptor.c +F: drivers/platform/dell/dell-wmi-descriptor.c DELL WMI HARDWARE PRIVACY SUPPORT L: [email protected] L: [email protected] S: Maintained -F: drivers/platform/x86/dell/dell-wmi-privacy.c +F: drivers/platform/dell/dell-wmi-privacy.c DELL WMI NOTIFICATIONS DRIVER M: Matthew Garrett <[email protected]> M: Pali Rohár <[email protected]> S: Maintained -F: drivers/platform/x86/dell/dell-wmi-base.c +F: drivers/platform/dell/dell-wmi-base.c DELL WMI SYSMAN DRIVER M: Prasanth Ksr <[email protected]>
@@ -7540,7 +7540,7 @@ L: [email protected] L: [email protected] S: Maintained F: Documentation/ABI/testing/sysfs-class-firmware-attributes -F: drivers/platform/x86/dell/dell-wmi-sysman/ +F: drivers/platform/dell/dell-wmi-sysman/ DELTA AHE-50DC FAN CONTROL MODULE DRIVER M: Zev Weiss <[email protected]>
drivers/platform/Kconfig +2 -0
@@ -15,6 +15,8 @@ source "drivers/platform/olpc/Kconfig" source "drivers/platform/surface/Kconfig" +source "drivers/platform/dell/Kconfig" + source "drivers/platform/x86/Kconfig" source "drivers/platform/arm64/Kconfig"
drivers/platform/Makefile +1 -0
@@ -12,6 +12,7 @@ obj-$(CONFIG_GOLDFISH) += goldfish/ obj-$(CONFIG_CHROME_PLATFORMS) += chrome/ obj-$(CONFIG_CZNIC_PLATFORMS) += cznic/ obj-$(CONFIG_SURFACE_PLATFORMS) += surface/ +obj-$(CONFIG_DELL_PLATFORMS) += dell/ obj-$(CONFIG_ARM64_PLATFORM_DEVICES) += arm64/ obj-$(CONFIG_BCM2835_VCHIQ) += raspberrypi/ obj-$(CONFIG_ACPI_WMI) += wmi/
drivers/platform/dell/Kconfig renamed from drivers/platform/x86/dell/Kconfig +12 -6
@@ -1,18 +1,20 @@ # SPDX-License-Identifier: GPL-2.0-only # -# Dell X86 Platform Specific Drivers +# Dell Platform Specific Drivers # -menuconfig X86_PLATFORM_DRIVERS_DELL - bool "Dell X86 Platform Specific Device Drivers" +menuconfig DELL_PLATFORMS + bool "Dell Platform Specific Device Drivers" + depends on X86 || ARM64 || COMPILE_TEST + default X86_PLATFORM_DRIVERS_DELL help Say Y here to get to see options for device drivers for various - Dell x86 platforms, including vendor-specific laptop extension drivers. + Dell platforms, including vendor-specific laptop extension drivers. This option alone does not add any kernel code. If you say N, all options in this submenu will be skipped and disabled. -if X86_PLATFORM_DRIVERS_DELL +if DELL_PLATFORMS config ALIENWARE_WMI tristate "Alienware Special feature control"
@@ -282,4 +284,8 @@ config DELL_DW5826E_RESET depends on ACPI help This adds support for the Dell DW5826e PLDR reset via ACPI -endif # X86_PLATFORM_DRIVERS_DELL +endif # DELL_PLATFORMS + +config X86_PLATFORM_DRIVERS_DELL + bool + transitional
drivers/platform/dell/Makefile renamed from drivers/platform/x86/dell/Makefile +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 # -# Makefile for linux/drivers/platform/x86/dell -# Dell x86 Platform-Specific Drivers +# Makefile for linux/drivers/platform/dell +# Dell Platform-Specific Drivers # obj-$(CONFIG_ALIENWARE_WMI) += alienware-wmi.o
drivers/platform/dell/alienware-wmi-base.c renamed from drivers/platform/x86/dell/alienware-wmi-base.c +0 -0
drivers/platform/dell/alienware-wmi-legacy.c renamed from drivers/platform/x86/dell/alienware-wmi-legacy.c +0 -0
drivers/platform/dell/alienware-wmi-wmax.c renamed from drivers/platform/x86/dell/alienware-wmi-wmax.c +0 -0
drivers/platform/dell/alienware-wmi.h renamed from drivers/platform/x86/dell/alienware-wmi.h +0 -0
drivers/platform/dell/dcdbas.c renamed from drivers/platform/x86/dell/dcdbas.c +0 -0
drivers/platform/dell/dcdbas.h renamed from drivers/platform/x86/dell/dcdbas.h +0 -0
drivers/platform/dell/dell-dw5826e-reset.c renamed from drivers/platform/x86/dell/dell-dw5826e-reset.c +0 -0
drivers/platform/dell/dell-laptop.c renamed from drivers/platform/x86/dell/dell-laptop.c +0 -0
drivers/platform/dell/dell-lis3lv02d.c renamed from drivers/platform/x86/dell/dell-lis3lv02d.c +0 -0
drivers/platform/dell/dell-pc.c renamed from drivers/platform/x86/dell/dell-pc.c +0 -0
drivers/platform/dell/dell-rbtn.c renamed from drivers/platform/x86/dell/dell-rbtn.c +0 -0
drivers/platform/dell/dell-rbtn.h renamed from drivers/platform/x86/dell/dell-rbtn.h +0 -0
drivers/platform/dell/dell-smbios-base.c renamed from drivers/platform/x86/dell/dell-smbios-base.c +0 -0
drivers/platform/dell/dell-smbios-smm.c renamed from drivers/platform/x86/dell/dell-smbios-smm.c +0 -0
drivers/platform/dell/dell-smbios-wmi.c renamed from drivers/platform/x86/dell/dell-smbios-wmi.c +0 -0
drivers/platform/dell/dell-smbios.h renamed from drivers/platform/x86/dell/dell-smbios.h +0 -0
drivers/platform/dell/dell-smo8800-ids.h renamed from drivers/platform/x86/dell/dell-smo8800-ids.h +0 -0
drivers/platform/dell/dell-smo8800.c renamed from drivers/platform/x86/dell/dell-smo8800.c +0 -0
drivers/platform/dell/dell-uart-backlight.c renamed from drivers/platform/x86/dell/dell-uart-backlight.c +1 -1
@@ -21,7 +21,7 @@#include <linux/types.h> #include <linux/wait.h> #include <acpi/video.h> -#include "../serdev_helpers.h" +#include "../x86/serdev_helpers.h" /* The backlight controller must respond within 1 second */ #define DELL_BL_TIMEOUT msecs_to_jiffies(1000)
drivers/platform/dell/dell-wmi-aio.c renamed from drivers/platform/x86/dell/dell-wmi-aio.c +0 -0
drivers/platform/dell/dell-wmi-base.c renamed from drivers/platform/x86/dell/dell-wmi-base.c +0 -0
drivers/platform/dell/dell-wmi-ddv.c renamed from drivers/platform/x86/dell/dell-wmi-ddv.c +0 -0
drivers/platform/dell/dell-wmi-descriptor.c renamed from drivers/platform/x86/dell/dell-wmi-descriptor.c +0 -0
drivers/platform/dell/dell-wmi-descriptor.h renamed from drivers/platform/x86/dell/dell-wmi-descriptor.h +0 -0
drivers/platform/dell/dell-wmi-led.c renamed from drivers/platform/x86/dell/dell-wmi-led.c +0 -0
drivers/platform/dell/dell-wmi-privacy.c renamed from drivers/platform/x86/dell/dell-wmi-privacy.c +0 -0
drivers/platform/dell/dell-wmi-privacy.h renamed from drivers/platform/x86/dell/dell-wmi-privacy.h +0 -0
drivers/platform/dell/dell-wmi-sysman/Makefile renamed from drivers/platform/x86/dell/dell-wmi-sysman/Makefile +0 -0
drivers/platform/dell/dell-wmi-sysman/biosattr-interface.c renamed from drivers/platform/x86/dell/dell-wmi-sysman/biosattr-interface.c +0 -0
drivers/platform/dell/dell-wmi-sysman/dell-wmi-sysman.h renamed from drivers/platform/x86/dell/dell-wmi-sysman/dell-wmi-sysman.h +0 -0
drivers/platform/dell/dell-wmi-sysman/enum-attributes.c renamed from drivers/platform/x86/dell/dell-wmi-sysman/enum-attributes.c +0 -0
drivers/platform/dell/dell-wmi-sysman/int-attributes.c renamed from drivers/platform/x86/dell/dell-wmi-sysman/int-attributes.c +0 -0
drivers/platform/dell/dell-wmi-sysman/passobj-attributes.c renamed from drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c +0 -0
drivers/platform/dell/dell-wmi-sysman/passwordattr-interface.c renamed from drivers/platform/x86/dell/dell-wmi-sysman/passwordattr-interface.c +0 -0
drivers/platform/dell/dell-wmi-sysman/string-attributes.c renamed from drivers/platform/x86/dell/dell-wmi-sysman/string-attributes.c +0 -0
drivers/platform/dell/dell-wmi-sysman/sysman.c renamed from drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +0 -0
drivers/platform/dell/dell_rbu.c renamed from drivers/platform/x86/dell/dell_rbu.c +0 -0
drivers/platform/x86/Kconfig +0 -2
@@ -392,8 +392,6 @@ config EEEPC_WMI If you have an ACPI-WMI compatible Eee PC laptop (>= 1000), say Y or M here. -source "drivers/platform/x86/dell/Kconfig" - config AMILO_RFKILL tristate "Fujitsu-Siemens Amilo rfkill support" depends on RFKILL
drivers/platform/x86/Makefile +0 -3
@@ -44,9 +44,6 @@ obj-$(CONFIG_AYANEO_EC) += ayaneo-ec.o # Cisco/Meraki obj-$(CONFIG_MERAKI_MX100) += meraki-mx100.o -# Dell -obj-$(CONFIG_X86_PLATFORM_DRIVERS_DELL) += dell/ - # Fujitsu obj-$(CONFIG_AMILO_RFKILL) += amilo-rfkill.o obj-$(CONFIG_FUJITSU_LAPTOP) += fujitsu-laptop.o
tools/arch/x86/dell-uart-backlight-emulator/README +2 -2
@@ -13,8 +13,8 @@ With the DELL0501 indicating that we are dealing with an UART with the backlight controller board attached. This small emulator allows testing -the drivers/platform/x86/dell/dell-uart-backlight.c driver without access -to an actual Dell All In One. +the drivers/platform/dell/dell-uart-backlight.c driver without access to +an actual Dell All In One. This requires: 1. A (desktop) PC with a 16550 UART on the motherboard and a standard DB9
Signature · 1 line
2.53.0
PATCH v2 4/10 MAINTAINERS: Add Dell platform drivers entry
In reply to Brian MakAdd an entry for the now-moved Dell platform drivers, so that misc files like the Kconfig and Makefile are covered.
--- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
@@ -7476,6 +7476,12 @@ L: [email protected] S: Maintained F: drivers/platform/dell/dell-pc.c +DELL PLATFORM DRIVERS +L: [email protected] +L: [email protected] +S: Maintained +F: drivers/platform/dell/ + DELL REMOTE BIOS UPDATE DRIVER M: Stuart Hayes <[email protected]> L: [email protected]
Signature · 1 line
2.53.0
PATCH v2 5/10 platform: dell: laptop: Compile out i8042 usage without SERIO_I8042
In reply to Brian Makdell-laptop uses the i8042 controller for two things: controlling the touchpad LED on certain models and receiving rfkill hotkey events when dell-rbtn is not available. When SERIO_I8042 is disabled, the i8042 stubs return -ENODEV, and neither path handles that gracefully:
- The touchpad LED is registered anyway, and writes to it do nothing.
- On Latitude and Precision models with a hardware rfkill switch and no dell-rbtn, i8042_install_filter() fails, and dell-laptop fails to load entirely.
Only register the touchpad LED when SERIO_I8042 is enabled. When neither dell-rbtn nor i8042 is available, skip rfkill instead of failing to load, since there would be no way to track the hardware switch state. Clear the rfkill pointers after unwinding so that dell_cleanup_rfkill() does not free them again.
This prepares for dropping the hard SERIO_I8042 dependency, so that dell-laptop can be built on platforms without an i8042 controller, such as ARM64.
--- drivers/platform/dell/dell-laptop.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-)
drivers/platform/dell/dell-laptop.c +16 -4
@@ -892,13 +892,17 @@ static int __init dell_setup_rfkill(void) }else if (ret != -ENODEV ) {pr_warn ("Unable to register dell rbtn notifier\n" ); goto err_filter; - }else { + }else if (IS_ENABLED (CONFIG_SERIO_I8042 )) { ret =i8042_install_filter (dell_laptop_i8042_filter,NULL );if (ret) {pr_warn ("Unable to install key filter\n" ); goto err_filter; }pr_info ("Using i8042 filter function for receiving events\n" ); + }else { +pr_info ("No source for receiving events, rfkill disabled\n" ); + ret =0 ; + goto err_filter; }return 0 ;
@@ -915,6 +919,9 @@ static int __init dell_setup_rfkill(void)rfkill_unregister (wifi_rfkill); err_wifi:rfkill_destroy (wifi_rfkill); + wifi_rfkill =NULL ; + bluetooth_rfkill =NULL ; + wwan_rfkill =NULL ;return ret; }
@@ -1014,6 +1021,11 @@ static void touchpad_led_exit(void)led_classdev_unregister (&touchpad_led); } +static bool dell_has_touchpad_led (void ) +{ +return IS_ENABLED (CONFIG_SERIO_I8042 ) && quirks && quirks->touchpad_led; +} +/* * Derived from information in smbios-keyboard-ctl: *
@@ -2487,7 +2499,7 @@ static int __init dell_init(void) goto fail_rfkill; } -if (quirks && quirks->touchpad_led) +if (dell_has_touchpad_led ())touchpad_led_init (&platform_device->dev);kbd_led_init (&platform_device->dev);
@@ -2564,7 +2576,7 @@ static int __init dell_init(void)debugfs_remove_recursive (dell_laptop_dir);dell_battery_exit ();kbd_led_exit (); -if (quirks && quirks->touchpad_led) +if (dell_has_touchpad_led ())touchpad_led_exit ();dell_cleanup_rfkill (); fail_rfkill:
@@ -2581,7 +2593,7 @@ static void __exit dell_exit(void) {dell_laptop_unregister_notifier (&dell_laptop_notifier);debugfs_remove_recursive (dell_laptop_dir); -if (quirks && quirks->touchpad_led) +if (dell_has_touchpad_led ())touchpad_led_exit ();kbd_led_exit ();dell_battery_exit ();
Signature · 1 line
2.53.0
PATCH v2 6/10 platform: dell: Allow DELL_LAPTOP to be arch-independent
In reply to Brian MakThe i8042 uses in dell-laptop (touchpad LED and rfkill event fallback) are now compiled out when SERIO_I8042 is disabled, so the hard dependency is no longer needed. Relax it to be an optional dependency, which allows building dell-laptop on architectures without an i8042 controller, such as ARM64.
--- drivers/platform/dell/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/dell/Kconfig +1 -1
@@ -77,7 +77,7 @@ config DELL_LAPTOP depends on ACPI_VIDEO || ACPI_VIDEO = n depends on RFKILL || RFKILL = n depends on DELL_WMI || DELL_WMI = n - depends on SERIO_I8042 + depends on SERIO_I8042 || SERIO_I8042 = n depends on DELL_SMBIOS select POWER_SUPPLY select LEDS_CLASS
Signature · 1 line
2.53.0
PATCH v2 7/10 platform: dell: smbios-wmi: Fix probe on RTX Spark
In reply to Brian Makdell-smbios-wmi fails to probe on RTX Spark due to a hardcoded SMBIOS handle (0xB100) of type 0xB1 (misc BIOS flags) that is numbered differently on Dell RTX Spark laptops. Remove the hardcoding of the SMBIOS handle (0xB100) and only match on the type (0xB1).
This fixes dell-smbios-wmi probe on Dell RTX Spark laptops.
--- drivers/platform/dell/dell-smbios-wmi.c | 2 -- 1 file changed, 2 deletions(-)
drivers/platform/dell/dell-smbios-wmi.c +0 -2
@@ -281,8 +281,6 @@ static void parse_b1_table(const struct dmi_header *dm)/* 4 bytes header, 8 bytes flags */ if (dm->length <12 )return ; -if (dm->handle !=0xb100 ) -return ;if ((flags->flags0 &FLAG_HAS_ACPI_WMI )) wmi_supported =1 ; }
Signature · 1 line
2.53.0
PATCH v2 8/10 platform: dell: smbios: Add quirk for non-functional calling interface
In reply to Brian MakOn Dell RTX Spark laptops, the SMBIOS calling interface completes every request with an all-zero buffer, even for requests that should fail. Drivers that rely on it, such as dell-laptop and dell-pc, end up reporting bogus state, like battery charge modes and thermal modes.
Add a DMI quirk list for platforms with a non-functional calling interface, and export dell_smbios_calls_functional() so that consumers can avoid loading on them. dell-smbios itself still loads, as dell-wmi depends on it.
--- drivers/platform/dell/dell-smbios-base.c | 22 ++++++++++++++++++++++ drivers/platform/dell/dell-smbios.h | 1 + 2 files changed, 23 insertions(+)
drivers/platform/dell/dell-smbios-base.c +22 -0
@@ -390,6 +390,28 @@ bool dell_smbios_class_is_supported(u16 class) }EXPORT_SYMBOL_GPL (dell_smbios_class_is_supported); +/* +* Some Dell firmware completes its proprietary SMBIOS calls with all zeroes, +* so any value read through it (tokens, battery and thermal modes) +* is invalid. +*/ +static const struct dmi_system_id dell_smbios_calls_broken_list[] = { + { + .ident ="Dell XPS 16 DX16263" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"XPS 16 DX16263" ), + }, + }, + { } +}; + +bool dell_smbios_calls_functional (void ) +{ +return !dmi_check_system (dell_smbios_calls_broken_list); +} +EXPORT_SYMBOL_GPL (dell_smbios_calls_functional); +static void __init parse_da_table (const struct dmi_header *dm) {/* Final token is a terminator, so we don't want to copy it */
drivers/platform/dell/dell-smbios.h +1 -0
@@ -89,6 +89,7 @@ int dell_laptop_register_notifier(struct notifier_block *nb);int dell_laptop_unregister_notifier (struct notifier_block *nb);void dell_laptop_call_notifier (unsigned long action,void *data);bool dell_smbios_class_is_supported (u16 class); +bool dell_smbios_calls_functional (void );/* for the supported backends */ #ifdef CONFIG_DELL_SMBIOS_WMI
Signature · 1 line
2.53.0
PATCH v2 9/10 platform: dell: laptop: Don't load if SMBIOS calls are non-functional
In reply to Brian Makdell-laptop relies on the SMBIOS calling interface for all of its functionality. On platforms where the interface returns all-zero buffers, dell-laptop reports bogus battery charge modes and thresholds, and registers mute and mic mute LEDs that do nothing.
Don't load dell-laptop on these platforms.
--- drivers/platform/dell/dell-laptop.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/platform/dell/dell-laptop.c +3 -0
@@ -2476,6 +2476,9 @@ static int __init dell_init(void)if (!dmi_check_system (dell_device_table))return -ENODEV ; +if (!dell_smbios_calls_functional ()) +return -ENODEV ; + quirks =NULL ;/* find if this machine support other functions */ dmi_check_system (dell_quirks);
Signature · 1 line
2.53.0
PATCH v2 10/10 platform: dell: pc: Don't load if SMBIOS calls are non-functional
In reply to Brian Makdell-pc relies on the SMBIOS calling interface for thermal modes. On platforms where the interface returns all-zero buffers, dell-pc reads no current thermal mode, and fails with "platform_profile probe failed".
Don't load dell-pc on these platforms.
--- drivers/platform/dell/dell-pc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/platform/dell/dell-pc.c +3 -0
@@ -282,6 +282,9 @@ static int __init dell_init(void)if (!dmi_check_system (dell_device_table))return -ENODEV ; +if (!dell_smbios_calls_functional ()) +return -ENODEV ; + dell_pc_fdev =faux_device_create ("dell-pc" ,NULL , &dell_pc_faux_ops);if (!dell_pc_fdev)return -ENODEV ;
Signature · 1 line
2.53.0