mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: Kurt Borja <kuurtb@gmail.com>,
	platform-driver-x86@vger.kernel.org,
	ilpo.jarvinen@linux.intel.com
Cc: Dell.Client.Kernel@dell.com, hdegoede@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] alienware-wmi: Fix X Series and G Series quirks
Date: Sat, 7 Dec 2024 19:57:09 +0100	[thread overview]
Message-ID: <8f41d636-31d0-4880-bf1d-9f2a07d51532@gmx.de> (raw)
In-Reply-To: <20241207053759.99608-2-kuurtb@gmail.com>

Am 07.12.24 um 06:38 schrieb Kurt Borja:

> Devices that are known to support the WMI thermal interface do not
> support the legacy LED control interface. Make `.num_zones = 0` and
> avoid calling alienware_zone_init() if that's the case.
>
> Verified by reading the ACPI tables of all supported devices.
>
> Fixes: 9f6c43041552 ("alienware-wmi: added platform profile support")
> Fixes: 1c1eb70e7d23 ("alienware-wmi: extends the list of supported models")
>
> Suggested-by: Armin Wolf <W_Armin@gmx.de>
> Signed-off-by: Kurt Borja <kuurtb@gmail.com>

Please remove the empty line after the Fixes tags. With that being addressed:

Reviewed-by: Armin Wolf <W_Armin@gmx.de>

> ---
> Suggested here:
>
> [1] https://lore.kernel.org/platform-driver-x86/38399b6a-e31c-4b99-a10e-01dc20649c24@gmx.de/
> ---
>   drivers/platform/x86/dell/alienware-wmi.c | 15 ++++++++++-----
>   1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c
> index 77465ed9b449..e69bf9a7b6c8 100644
> --- a/drivers/platform/x86/dell/alienware-wmi.c
> +++ b/drivers/platform/x86/dell/alienware-wmi.c
> @@ -190,7 +190,7 @@ static struct quirk_entry quirk_asm201 = {
>   };
>
>   static struct quirk_entry quirk_g_series = {
> -	.num_zones = 2,
> +	.num_zones = 0,
>   	.hdmi_mux = 0,
>   	.amplifier = 0,
>   	.deepslp = 0,
> @@ -199,7 +199,7 @@ static struct quirk_entry quirk_g_series = {
>   };
>
>   static struct quirk_entry quirk_x_series = {
> -	.num_zones = 2,
> +	.num_zones = 0,
>   	.hdmi_mux = 0,
>   	.amplifier = 0,
>   	.deepslp = 0,
> @@ -687,6 +687,9 @@ static void alienware_zone_exit(struct platform_device *dev)
>   {
>   	u8 zone;
>
> +	if (!quirks->num_zones)
> +		return;
> +
>   	sysfs_remove_group(&dev->dev.kobj, &zone_attribute_group);
>   	led_classdev_unregister(&global_led);
>   	if (zone_dev_attrs) {
> @@ -1229,9 +1232,11 @@ static int __init alienware_wmi_init(void)
>   			goto fail_prep_thermal_profile;
>   	}
>
> -	ret = alienware_zone_init(platform_device);
> -	if (ret)
> -		goto fail_prep_zones;
> +	if (quirks->num_zones > 0) {
> +		ret = alienware_zone_init(platform_device);
> +		if (ret)
> +			goto fail_prep_zones;
> +	}
>
>   	return 0;
>

      reply	other threads:[~2024-12-07 18:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-07  5:38 Kurt Borja
2024-12-07 18:57 ` Armin Wolf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f41d636-31d0-4880-bf1d-9f2a07d51532@gmx.de \
    --to=w_armin@gmx.de \
    --cc=Dell.Client.Kernel@dell.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kuurtb@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®