lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241205004804.2187253-2-kuurtb@gmail.com>
Date: Wed,  4 Dec 2024 21:48:05 -0300
From: Kurt Borja <kuurtb@...il.com>
To: kuurtb@...il.com
Cc: Dell.Client.Kernel@...l.com,
	hdegoede@...hat.com,
	ilpo.jarvinen@...ux.intel.com,
	linux-kernel@...r.kernel.org,
	mario.limonciello@....com,
	platform-driver-x86@...r.kernel.org,
	w_armin@....de
Subject: [RFC PATCH 21/21] platform-x86: Add config entries to alienware-wmi

Add config entries to conditionally compile alienware-wmi-alienfx.c and
alienware-wmi-awcc.c.

Signed-off-by: Kurt Borja <kuurtb@...il.com>
---
 drivers/platform/x86/dell/Kconfig         | 25 ++++++++++++++++++-----
 drivers/platform/x86/dell/Makefile        |  8 ++++----
 drivers/platform/x86/dell/alienware-wmi.h | 22 ++++++++++++++++++++
 3 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/drivers/platform/x86/dell/Kconfig b/drivers/platform/x86/dell/Kconfig
index 2dddafb3f7fa..fcc7f7d28ac1 100644
--- a/drivers/platform/x86/dell/Kconfig
+++ b/drivers/platform/x86/dell/Kconfig
@@ -18,16 +18,31 @@ config ALIENWARE_WMI
 	tristate "Alienware Special feature control"
 	default m
 	depends on ACPI
+	depends on ACPI_WMI
+	help
+	 This is a driver for controlling Alienware WMI driven
+	 features.
+
+config ALIENWARE_ALIENFX
+	bool "Alienware AlienFX backend"
+	default y
 	depends on LEDS_CLASS
 	depends on NEW_LEDS
-	depends on ACPI_WMI
-	select ACPI_PLATFORM_PROFILE
+	depends on ALIENWARE_WMI
 	help
-	 This is a driver for controlling Alienware BIOS driven
-	 features.  It exposes an interface for controlling the AlienFX
-	 zones on Alienware machines that don't contain a dedicated AlienFX
+	 It exposes an interface for controlling the AlienFX zones on
+	 Alienware machines that don't contain a dedicated AlienFX
 	 USB MCU such as the X51 and X51-R2.
 
+config ALIENWARE_AWCC
+	bool "Alienware AWCC backend"
+	default y
+	depends on ALIENWARE_WMI
+	select ACPI_PLATFORM_PROFILE
+	help
+	 Provides thermal control features on Alienware and Dell's
+	 GSeries laptops with a WMI device with UID "AWCC".
+
 config DCDBAS
 	tristate "Dell Systems Management Base Driver"
 	default m
diff --git a/drivers/platform/x86/dell/Makefile b/drivers/platform/x86/dell/Makefile
index 54a592fd6ae6..6153cff5538f 100644
--- a/drivers/platform/x86/dell/Makefile
+++ b/drivers/platform/x86/dell/Makefile
@@ -4,10 +4,10 @@
 # Dell x86 Platform-Specific Drivers
 #
 
-obj-$(CONFIG_ALIENWARE_WMI)		+= alienware-wmi.o
-alienware-wmi-objs			:= alienware-wmi-base.o
-alienware-wmi-y				+= alienware-wmi-alienfx.o
-alienware-wmi-y				+= alienware-wmi-awcc.o
+obj-$(CONFIG_ALIENWARE_WMI)			+= alienware-wmi.o
+alienware-wmi-objs				:= alienware-wmi-base.o
+alienware-wmi-$(CONFIG_ALIENWARE_ALIENFX)	+= alienware-wmi-alienfx.o
+alienware-wmi-$(CONFIG_ALIENWARE_AWCC)		+= alienware-wmi-awcc.o
 obj-$(CONFIG_DCDBAS)			+= dcdbas.o
 obj-$(CONFIG_DELL_LAPTOP)		+= dell-laptop.o
 obj-$(CONFIG_DELL_RBTN)			+= dell-rbtn.o
diff --git a/drivers/platform/x86/dell/alienware-wmi.h b/drivers/platform/x86/dell/alienware-wmi.h
index 1c12b8e330e2..16624c824828 100644
--- a/drivers/platform/x86/dell/alienware-wmi.h
+++ b/drivers/platform/x86/dell/alienware-wmi.h
@@ -110,10 +110,32 @@ struct awcc_priv {
 acpi_status alienware_wmi_command(struct wmi_device *wdev, u32 method_id,
 				  void *in_args, size_t in_size, u32 *out_data);
 
+#if IS_ENABLED(CONFIG_ALIENWARE_ALIENFX)
 int alienfx_wmi_init(struct alienfx_platdata *pdata);
 void alienfx_wmi_exit(struct wmi_device *wdev);
+#else
+int inline alienfx_wmi_init(struct alienfx_platdata *pdata)
+{
+	return 0;
+}
+
+void inline alienfx_wmi_exit(struct wmi_device *wdev)
+{
+}
+#endif
 
+#if IS_ENABLED(CONFIG_ALIENWARE_AWCC)
 int create_thermal_profile(struct wmi_device *wdev, bool has_gmode);
 void remove_thermal_profile(void);
+#else
+int inline create_thermal_profile(struct wmi_device *wdev, bool has_gmode)
+{
+	return 0;
+}
+
+void inline remove_thermal_profile(void)
+{
+}
+#endif
 
 #endif
-- 
2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ