From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Mohamed Ghanmi <mohamed.ghanmi@supcom.tn>
Cc: Hans de Goede <hdegoede@redhat.com>,
corentin.chary@gmail.com, platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
"Luke D . Jones" <luke@ljones.dev>
Subject: Re: [PATCH v1 1/1] platform/x86: asus-wmi: add support for vivobook fan profiles
Date: Thu, 18 Apr 2024 21:50:01 +0300 (EEST) [thread overview]
Message-ID: <772e3de4-4e42-474e-8a7f-75e592756053@linux.intel.com> (raw)
In-Reply-To: <20240418181057.2688-2-mohamed.ghanmi@supcom.tn>
[-- Attachment #1: Type: text/plain, Size: 1810 bytes --]
On Thu, 18 Apr 2024, Mohamed Ghanmi wrote:
> Add support for vivobook fan profiles wmi call on the ASUS VIVOBOOK
> to adjust power limits.
>
> These fan profiles have a different device id than the ROG series
> and different order. This reorders the existing modes and adds a new
> full speed mode available on these laptops.
>
> As part of keeping the patch clean the throttle_thermal_policy_available
> boolean stored in the driver struct is removed and
> throttle_thermal_policy_dev is used in place (as on init it is zeroed).
>
> Signed-off-by: Mohamed Ghanmi <mohamed.ghanmi@supcom.tn>
> Co-developed-by: Luke D. Jones <luke@ljones.dev>
> Signed-off-by: Luke D. Jones <luke@ljones.dev>
> ---
> @@ -3618,38 +3623,38 @@ static int asus_wmi_custom_fan_curve_init(struct asus_wmi *asus)
> }
>
> /* Throttle thermal policy ****************************************************/
> -
> -static int throttle_thermal_policy_check_present(struct asus_wmi *asus)
> +static u8 throttle_thermal_policy_max_mode(struct asus_wmi *asus)
> {
> - u32 result;
> - int err;
> -
> - asus->throttle_thermal_policy_available = false;
> -
> - err = asus_wmi_get_devstate(asus,
> - ASUS_WMI_DEVID_THROTTLE_THERMAL_POLICY,
> - &result);
> - if (err) {
> - if (err == -ENODEV)
> - return 0;
> - return err;
> + if (asus->throttle_thermal_policy_dev == ASUS_WMI_DEVID_THROTTLE_THERMAL_POLICY_VIVO) {
> + return ASUS_THROTTLE_THERMAL_POLICY_FULLSPEED;
> + } else {
> + return ASUS_THROTTLE_THERMAL_POLICY_SILENT;
> }
Thanks for the update, braces are unnecessary here. Other than that, this
looks fine:
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
(This was not v1 any more, although the v1 was sent not by you but
Luke).
--
i.
prev parent reply other threads:[~2024-04-18 18:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 18:10 [PATCH v1 0/1] platform/x86: asus-wmi: add support for vivobook fan profiles Mohamed Ghanmi
2024-04-18 18:10 ` [PATCH v1 1/1] " Mohamed Ghanmi
2024-04-18 18:50 ` Ilpo Järvinen [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=772e3de4-4e42-474e-8a7f-75e592756053@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=corentin.chary@gmail.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--cc=mohamed.ghanmi@supcom.tn \
--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