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

Ilpo Järvinen <[email protected]>
Newsgroups org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, 13 Aug 2026, Mohsen Tahmasebi wrote:

> 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;

Hi,

Thanks for the patch.

Why is this u8? This should be bool.

Some others should have been too. If you want (not mandatory), you could 
add patches to your series to convert the other as well when prepare v2 
of the series.

>  	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;

Please properly split .hwmon completely out of .predator_v4 so that quirk 
entries that have .predator_v4 also use .hwmon.

I'm on the borderline if also .predator_v4 should be renamed to something 
related to platform profile.

-- 
 i.
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.