From patchwork Mon Nov 4 18:26:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Maksymchuk X-Patchwork-Id: 11226243 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0549716B1 for ; Mon, 4 Nov 2019 18:26:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5A1320578 for ; Mon, 4 Nov 2019 18:26:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YBrxIv6U" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728321AbfKDS0k (ORCPT ); Mon, 4 Nov 2019 13:26:40 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:39962 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727998AbfKDS0k (ORCPT ); Mon, 4 Nov 2019 13:26:40 -0500 Received: by mail-lj1-f195.google.com with SMTP id q2so12209937ljg.7; Mon, 04 Nov 2019 10:26:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=aM/NqY9X7bejgM2hiDB5HuQIJW6HNTiHKqYAR0ieXv4=; b=YBrxIv6UrijO5SS6pz/P6wAwlVWcSD+pk1Qxi+ZdOCSGV9b/VHYT286G/hoFHd7r14 +QR47o9s7Lacdgs3WpbBgWW182/Rvr8pmJ/+gkl8pFKO20ahJj62atzX5iKL3PA4FxiL gCSSW9DXeHSadbLtl6SiuT2VOpzK3tItjqcuWJSPoRpWTr9rBB9m5BBh9fdAMj0U023b Vi2S0RzbA64YznCBkKa3fU2zKd/7buvAXfRxvAVLlvLqaq9k4atlN+DpA8bK8eY8aBfO lbzIZG2mpuzklUIrrwHPMdMGYiPoIuoKw8yrWxn0vbHRPMdDW8sZdPow3fnwNYoorrvn rsrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=aM/NqY9X7bejgM2hiDB5HuQIJW6HNTiHKqYAR0ieXv4=; b=aMdDOtGhywssH9vhYz0IG3mHk6a5ao+9963zXDw0+StmxaYSc+GQT9GE+FbiajnMgu xA4IoeY/sTSU2P5wxQreTS1RwMEf90A11dr0Hs+q67FG5uCjvc0EqybNzvd2NQZOHNhf KNBLJCALzK/Ak7iKJjrPiJ5EX7o9U3cv728DyUXcISAH/yJeuGoDm/+T5E1bt0EFBn0Y /TOzSmqgCWLOihEEOb99Dav6TRvrx//DOhMDYgeNQMokXrhxVjZA3npwyzCmYPzN6T4Z p6/tq1fg37XtNAtV8BUa+V7pN2bFhIQWuo2+Kf77E1Fxzx5MV8VjdkGqdJtYA49/BZf4 SqPA== X-Gm-Message-State: APjAAAXTH+QLCHhXBZo3ydZZOoBjKapV4mSBQVicBDaF5WcjkIs1J+aB RAOYS3mxL+GK/tlG/g4ZVdY= X-Google-Smtp-Source: APXvYqxFiVpWB2HnWSrfAlikObQNMCR3fieTkw2KFMjLHb+7UhapvHY+NYuyfmMkjXOyj9hATZLBIQ== X-Received: by 2002:a2e:3a1a:: with SMTP id h26mr19999494lja.25.1572891998287; Mon, 04 Nov 2019 10:26:38 -0800 (PST) Received: from [10.0.0.92] ([91.237.107.85]) by smtp.gmail.com with ESMTPSA id t10sm7394339ljt.68.2019.11.04.10.26.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Nov 2019 10:26:37 -0800 (PST) Subject: [RFC PATCH 1/3] platform/x86: asus_wmi: Fix return value of fan_boost_mode_store From: Leonid Maksymchuk To: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org, acpi4asus-user@lists.sourceforge.net, chiu@endlessm.com, yurii.pavlovskyi@gmail.com, kristian@klausen.dk, andy@infradead.org, dvhart@infradead.org, corentin.chary@gmail.com References: Message-ID: <6452b246-ab31-2a0e-8324-f951681154af@gmail.com> Date: Mon, 4 Nov 2019 20:26:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Function fan_boost_mode_store should return number of bytes written but instead it returns return value of kstrtou8 which is 0 if conversion is succefull. This leads to infinite loop after any write to it's SysFS entry. Fixes: b096f626a682 ("platform/x86: asus-wmi: Switch fan boost mode") Signed-off-by: Leonid Maksymchuk --- drivers/platform/x86/asus-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 821b08e..723aa4d 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -1718,7 +1718,7 @@ static ssize_t fan_boost_mode_store(struct device *dev, asus->fan_boost_mode = new_mode; fan_boost_mode_write(asus); - return result; + return count; } // Fan boost mode: 0 - normal, 1 - overboost, 2 - silent From patchwork Mon Nov 4 18:28:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Maksymchuk X-Patchwork-Id: 11226245 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ECDAC16B1 for ; Mon, 4 Nov 2019 18:28:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C931220869 for ; Mon, 4 Nov 2019 18:28:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YywywOYb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728965AbfKDS2e (ORCPT ); Mon, 4 Nov 2019 13:28:34 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:38412 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727998AbfKDS2e (ORCPT ); Mon, 4 Nov 2019 13:28:34 -0500 Received: by mail-lj1-f193.google.com with SMTP id v8so3122668ljh.5; Mon, 04 Nov 2019 10:28:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=9BkQFloRSV64INcQit1KezHLbgCAUZxVpxOp1Jw5hWA=; b=YywywOYb3xP5c44Erlikt9y1YFx7wsEtTV6qU+tVvWvIQthuNeP+GatDUwefUPPjRn 6AuKsybYHjlyQMkpsVDN3iCxNhBgqbHOGMHXkiDYGMoWQgGkcUoTUUQqJtqC5yb1d/++ 3rGTXFdb+NFoeJ52Wrfg47CyOet6Pv5gRumzHmz1oyrZhSLrnc/HSTYolesvtnygu/r1 8Z7i6+mCGy578VYP0KH6IxMyLbaHIBBYgJJdEWRflWRTf+6s0GbA5CYezw9g7ksEzovL JEj1IhIdjdOUmsACs+mZgy1FnoOTd2QFx0dulpcs4FVA5NcOLQuEFzy2CfL8l30w8ltw xr7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=9BkQFloRSV64INcQit1KezHLbgCAUZxVpxOp1Jw5hWA=; b=dN1J22XPaqG6e6A0BR4d0e+0aLa5gf3dTN7bTMkAqIOx00YVNFW9UDaFq/KI24uBHY zv9GawzDyP9C8KuhOlPfbIoiON51Kv7+6InnoezrMPLbxt+RdWUD+a47Ghg0F2Gvi86D 0oOX1S4nbSQpalyMRObHgnQrqoYa9qzDtOnwv6JsHnhOzlTH4XKPEEbMtcWK5WoeCh4X qsRi5QuJaSPVYdGxkNq1v4GpiDE4z8difoZf/Qej8kd5e6o3+RhHw8wXx76PDYL5ZB56 rK2zIc+G5VwiJQYpYWodDgH4VTzYu4vKboSdBy0D4q0Ci0rukUt8WAqASGo4/sO8oxxD LpZQ== X-Gm-Message-State: APjAAAWpuEf3zY48oiszp0WhREJPeK3dz5iFy5Ehmgcceei8pLzJDO5g G8YKt+otOMxZwbFbKyE7yh0= X-Google-Smtp-Source: APXvYqw+BMMV9j/4E2cuwMH5LcOk0YaqBDV0CDhZpvx/+k9WlbvBi7wkEPXT2+qFR2YC0WvsefyXuw== X-Received: by 2002:a2e:2e10:: with SMTP id u16mr16345273lju.51.1572892111614; Mon, 04 Nov 2019 10:28:31 -0800 (PST) Received: from [10.0.0.92] ([91.237.107.85]) by smtp.gmail.com with ESMTPSA id f5sm6790820ljn.24.2019.11.04.10.28.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Nov 2019 10:28:31 -0800 (PST) Subject: [RFC PATCH 2/3] platform/x86: asus_wmi: Support fan boost mode on FX505DY/FX705DY From: Leonid Maksymchuk To: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org, acpi4asus-user@lists.sourceforge.net, chiu@endlessm.com, yurii.pavlovskyi@gmail.com, kristian@klausen.dk, andy@infradead.org, dvhart@infradead.org, corentin.chary@gmail.com References: Message-ID: <2d524444-ba3f-40cf-a10a-1e3c638aae34@gmail.com> Date: Mon, 4 Nov 2019 20:28:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org On ASUS FX505DY/FX705DY laptops fan boost mode is same as in other TUF laptop models but have different ACPI device ID and different key code. Signed-off-by: Leonid Maksymchuk --- drivers/platform/x86/asus-wmi.c | 42 ++++++++++++++++++++---------- include/linux/platform_data/x86/asus-wmi.h | 1 + 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 723aa4d..f4e5840 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -61,6 +61,7 @@ #define NOTIFY_KBD_BRTDWN 0xc5 #define NOTIFY_KBD_BRTTOGGLE 0xc7 #define NOTIFY_KBD_FBM 0x99 +#define NOTIFY_KBD_FBM_2 0xae #define ASUS_WMI_FNLOCK_BIOS_DISABLED BIT(0) @@ -194,7 +195,7 @@ struct asus_wmi { int fan_pwm_mode; int agfn_pwm; - bool fan_boost_mode_available; + int fan_boost_mode_available; u8 fan_boost_mode_mask; u8 fan_boost_mode; @@ -1616,24 +1617,33 @@ static int fan_boost_mode_check_present(struct asus_wmi *asus) u32 result; int err; - asus->fan_boost_mode_available = false; + asus->fan_boost_mode_available = 0; err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_FAN_BOOST_MODE, &result); - if (err) { - if (err == -ENODEV) - return 0; - else - return err; + + if (err == 0 && + (result & ASUS_WMI_DSTS_PRESENCE_BIT) && + (result & ASUS_FAN_BOOST_MODES_MASK)) { + asus->fan_boost_mode_available = 1; + asus->fan_boost_mode_mask = result & ASUS_FAN_BOOST_MODES_MASK; + return 0; } - if ((result & ASUS_WMI_DSTS_PRESENCE_BIT) && + err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_FAN_BOOST_MODE_2, + &result); + + if (err == 0 && + (result & ASUS_WMI_DSTS_PRESENCE_BIT) && (result & ASUS_FAN_BOOST_MODES_MASK)) { - asus->fan_boost_mode_available = true; + asus->fan_boost_mode_available = 2; asus->fan_boost_mode_mask = result & ASUS_FAN_BOOST_MODES_MASK; } - return 0; + if (err == -ENODEV) + return 0; + + return err; } static int fan_boost_mode_write(struct asus_wmi *asus) @@ -1641,12 +1651,15 @@ static int fan_boost_mode_write(struct asus_wmi *asus) int err; u8 value; u32 retval; + u32 dev_id = asus->fan_boost_mode_available == 1 ? + ASUS_WMI_DEVID_FAN_BOOST_MODE : + ASUS_WMI_DEVID_FAN_BOOST_MODE_2; value = asus->fan_boost_mode; pr_info("Set fan boost mode: %u\n", value); - err = asus_wmi_set_devstate(ASUS_WMI_DEVID_FAN_BOOST_MODE, value, - &retval); + err = asus_wmi_set_devstate(dev_id, value, &retval); + if (err) { pr_warn("Failed to set fan boost mode: %d\n", err); return err; @@ -2000,7 +2013,8 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus) return; } - if (asus->fan_boost_mode_available && code == NOTIFY_KBD_FBM) { + if (asus->fan_boost_mode_available && + (code == NOTIFY_KBD_FBM || code == NOTIFY_KBD_FBM_2) { fan_boost_mode_switch_next(asus); return; } @@ -2177,7 +2191,7 @@ static umode_t asus_sysfs_is_visible(struct kobject *kobj, else if (attr == &dev_attr_als_enable.attr) devid = ASUS_WMI_DEVID_ALS_ENABLE; else if (attr == &dev_attr_fan_boost_mode.attr) - ok = asus->fan_boost_mode_available; + ok = asus->fan_boost_mode_available != 0; if (devid != -1) ok = !(asus_wmi_get_devstate_simple(asus, devid) < 0); diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h index 60249e2..714782b 100644 --- a/include/linux/platform_data/x86/asus-wmi.h +++ b/include/linux/platform_data/x86/asus-wmi.h @@ -58,6 +58,7 @@ #define ASUS_WMI_DEVID_LIGHT_SENSOR 0x00050022 /* ?? */ #define ASUS_WMI_DEVID_LIGHTBAR 0x00050025 #define ASUS_WMI_DEVID_FAN_BOOST_MODE 0x00110018 +#define ASUS_WMI_DEVID_FAN_BOOST_MODE_2 0x00120075 /* Misc */ #define ASUS_WMI_DEVID_CAMERA 0x00060013 From patchwork Mon Nov 4 18:29:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Maksymchuk X-Patchwork-Id: 11226247 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EFCFE13BD for ; Mon, 4 Nov 2019 18:29:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC46320869 for ; Mon, 4 Nov 2019 18:29:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FhP+Coa4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728377AbfKDS3M (ORCPT ); Mon, 4 Nov 2019 13:29:12 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:45775 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727998AbfKDS3M (ORCPT ); Mon, 4 Nov 2019 13:29:12 -0500 Received: by mail-lj1-f193.google.com with SMTP id n21so5143748ljg.12; Mon, 04 Nov 2019 10:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=iurp4sakzOCEdz++tzDZDRAOZsuv2t30XmhXJuaXI1U=; b=FhP+Coa4xrCVJSA2wk7Q++T98lLzBYox7OuEhQcApIOnJrozp+CsznourVqj/8o78R 5e/VbPwzAMaFVm9seppk9L8NuaEpUZJY4/QtAiZ3BSwuIh4t31v70qwf8BxK5xZSrmAG CtjYaOc/1agpSiXygv2Dkq88D1UAIZpe2mnu+2y7pWNOTJZf0LnCXjd/IRWpCX1Xr2JD i41vqVGZ8mBWtK0cRN0bjqlCN+FzKhe76TzrcSvGCCMLZcLU/ucPzp4tOYk4cdsQSWcj 9VY6KEa6aA2lOD1nKBI0bHpPZSROO6a+ZIL+LMcD8qTf/gZ7hsOEGI7MmGAfkK+c7PZG 6qXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=iurp4sakzOCEdz++tzDZDRAOZsuv2t30XmhXJuaXI1U=; b=ZsgNSQRxDpKAIwmOCOLW98+fCp5qgUrYPFaEWIiv6oLKqgaJrbuEyVpt2Q7e8WQVv6 D0/83GwWFrZtvMjNj+ujRwaZVgVCanU6o+7XcvQqddmUIhNJ4F3bSbUjjOIcSD9pU434 GcctBJCWrZJm37dYsVKIsNicbM7cNue4S+pgDgQlv4L+KyDXxeRPyRbl6hQy+NmDmZtQ Ya/iJfn9C7NF5IalP0biVonnROZWVs7+MvVYnEZauBQEO3e9kpqQ5tPTDtRKcjJuPUUl pouOqsfSrnzWqlLJCIhuEM9q+bg9ohDhgMrHhQR3g3SaEQtp+F5lh/Dka9Pw0Rn9zbqL ZeMg== X-Gm-Message-State: APjAAAU6LoNcgyZ1HAyrdhFZPU1d6mPuXctxMtJqErNK0BRfDFJVgaSD b58aqTTw4mYfQtOjZwFmn9I= X-Google-Smtp-Source: APXvYqyQZbSkgVYTSJZRZbeBrgTs168W78IMreE/jqweUokSAkJEf3JMrVEnQd+u4Nw9Jlt1+JfhzQ== X-Received: by 2002:a05:651c:1127:: with SMTP id e7mr11371383ljo.70.1572892149961; Mon, 04 Nov 2019 10:29:09 -0800 (PST) Received: from [10.0.0.92] ([91.237.107.85]) by smtp.gmail.com with ESMTPSA id a11sm7159646ljp.97.2019.11.04.10.29.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Nov 2019 10:29:09 -0800 (PST) Subject: [RFC PATCH 3/3] platform/x86: asus_wmi: Set default fan boost mode to normal From: Leonid Maksymchuk To: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org, acpi4asus-user@lists.sourceforge.net, chiu@endlessm.com, yurii.pavlovskyi@gmail.com, kristian@klausen.dk, andy@infradead.org, dvhart@infradead.org, corentin.chary@gmail.com References: Message-ID: Date: Mon, 4 Nov 2019 20:29:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Set default fan boost mode to normal for multiple reasons: 1) existing code assumes that laptop started in normal mode and that is not always correct. 2) FX705DY/FX505DY starts in silent mode and under heavy CPU load it overheats and drops CPU frequency to 399MHz [1]. Setting fan mode to normal avoids overheating. [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=203733 Signed-off-by: Leonid Maksymchuk --- drivers/platform/x86/asus-wmi.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index f4e5840..70c5fbb 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -1674,6 +1674,18 @@ static int fan_boost_mode_write(struct asus_wmi *asus) return 0; } +static int fan_boost_mode_set_default(struct asus_wmi *asus) +{ + int result = 0; + + if (asus->fan_boost_mode_available) { + asus->fan_boost_mode = ASUS_FAN_BOOST_MODE_NORMAL; + result = fan_boost_mode_write(asus); + } + + return result; +} + static int fan_boost_mode_switch_next(struct asus_wmi *asus) { u8 mask = asus->fan_boost_mode_mask; @@ -2450,6 +2462,7 @@ static int asus_wmi_add(struct platform_device *pdev) err = fan_boost_mode_check_present(asus); if (err) goto fail_fan_boost_mode; + fan_boost_mode_set_default(asus); err = asus_wmi_sysfs_init(asus->platform_device); if (err)