platform/x86: alienware-wmi: Add WMI Drivers
authorKurt Borja <kuurtb@gmail.com>
Fri, 7 Feb 2025 15:45:58 +0000 (10:45 -0500)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 10 Feb 2025 10:56:14 +0000 (12:56 +0200)
commit898a2302d7c7db0fe604326b9c7c484b71b2bb00
tree79bb29ae3be64e3865e1de248c62cf50e4a9d37d
parent4c546de990543b303ad130276316ca868ba599f9
platform/x86: alienware-wmi: Add WMI Drivers

Add WMI drivers for LEGACY and WMAX devices.

This involves moving the platform device registration to a helper
function that is now called from the driver's preferred WMI device
driver probe. In the case of the WMAX this is done only if
`!quirks->thermal` because the newer WMAX interface doesn't support any
of the LED features of this driver. This also eliminates the need to
check for `quirks->num_zones > 0` inside alienfx_probe().

Only one WMI driver is registered on module initialization to prevent
registering a duplicate platform device.

Additionally, create_thermal_profile() now takes wmi_device * instead of
platform_device *.

Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20250207154610.13675-3-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/dell/alienware-wmi.c