[PATCH 1/2] platform/x86: acer-wmi: allow hwmon without predator_v4

Mohsen Tahmasebi <[email protected]>
Newsgroups org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Some Acer laptops expose the same WMI sensor interface without necessarily
supporting other predator_v4 features.
Currently, ACER_CAP_HWMON is enabled only through predator_v4 quirk, but
this quirk enables both ACER_CAP_PLATFORM_PROFILE and ACER_CAP_HWMON.

This commit adds a separate hwmon quirk so ACER_CAP_HWMON can be enabled
without other predator_v4 features.

Signed-off-by: Mohsen Tahmasebi <[email protected]>
---
 drivers/platform/x86/acer-wmi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index e0eaaefb13d..83448561189 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -403,6 +403,7 @@ struct quirk_entry {
 	u8 turbo;
 	u8 cpu_fans;
 	u8 gpu_fans;
+	u8 hwmon;
 	u8 predator_v4;
 	u8 pwm;
 };
@@ -421,6 +422,9 @@ static void __init set_quirks(void)
 		interface->capability |= ACER_CAP_TURBO_OC | ACER_CAP_TURBO_LED
 					 | ACER_CAP_TURBO_FAN;
 
+	if (quirks->hwmon)
+		interface->capability |= ACER_CAP_HWMON;
+
 	if (quirks->predator_v4)
 		interface->capability |= ACER_CAP_PLATFORM_PROFILE |
 					 ACER_CAP_HWMON;

base-commit: 3d6d817622b0a9721e3cc404df3469171582be13
-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.