lkml.org 
[lkml]   [2024]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 1/1] platform/x86: asus-wmi: add support for vivobook fan profiles
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.
\
 
 \ /
  Last update: 2024-05-27 16:46    [W:0.788 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site