From patchwork Mon Nov 4 21:37: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: 11226551 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 8D7D015AB for ; Mon, 4 Nov 2019 21:37:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B9AE20848 for ; Mon, 4 Nov 2019 21:37:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IySF53AO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728409AbfKDVh1 (ORCPT ); Mon, 4 Nov 2019 16:37:27 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:44862 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728377AbfKDVh0 (ORCPT ); Mon, 4 Nov 2019 16:37:26 -0500 Received: by mail-lj1-f196.google.com with SMTP id g3so13216087ljl.11; Mon, 04 Nov 2019 13:37:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aM/NqY9X7bejgM2hiDB5HuQIJW6HNTiHKqYAR0ieXv4=; b=IySF53AOlpYLdgqECSOvm/SqmP6X9mL7yed/9oMaXDkjR5s33TJdJ+MSp92G4ScdCR GgX+6U7AdpDEsLnF2cSwNbOlPDEah4BMhrDKRgj//oFLqKI5pA5P+lKuIsweFet7JDw3 1XnESNP4COm7X6smhD/1yMzWSpDRoAfwkMld0ENd9iGSA0Kh/Cy+gcrldtA6msmcGVTh KUOPR0pI5wVmoiG5wIodkQHSm7FJjRx5JnkzUe8sCIPK6cXxCQstLPT6mmDjvdYGWKg3 IMLLoJNcGudGgpMzULjwA9iEiEIz5MTPsSyZSUBpZdE3MMvV624O3bXyhY48D+y4ulcs hUiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aM/NqY9X7bejgM2hiDB5HuQIJW6HNTiHKqYAR0ieXv4=; b=PE+cL9oodzyCJL25xqvLik6AL9XtZ0S00KaHTPF7NMd/YhM4xXXeO0MRhSgkJKR3Zk CDTLvNMdaoeUpAVUECGJg0vkVPBcpXfuomtLb2M3q7V/Iky9ryyMYVKRDfa+OHK1rlXw RlkLJ79NKhmwfKfidVtZ+slIOZ4LkflZAUt0Bk7A8vrirbE5EoNx6Q4dcS6sOEalHW5Y vMRI1BmLUOIn3SABJv9pDIrPlLCNDAKPW56WuMGhujkPUqueh2EBxHou6TEjYru+stIv lIuw9/o62BuO275TMtgKTKrySREHEU1Zcp+p7Ruu0n6SGiDf2NOmTDZFL7bk9IkGIm8q NC5Q== X-Gm-Message-State: APjAAAV4L31ltpq/lTvZUTAn9f17ZHM9xiTW/xAP4J4S/ZkBnDo+bZDm 6amtb9S6DL+Px2zcO0Xw/GXQQAYWQVs= X-Google-Smtp-Source: APXvYqweBtEACZoySgQRDylgmupur12Ksn/LyXpt5c/NUN1boQKhzk0ZLsWyYraI07kiv4MxojGhLw== X-Received: by 2002:a2e:9417:: with SMTP id i23mr8216022ljh.152.1572903444210; Mon, 04 Nov 2019 13:37:24 -0800 (PST) Received: from localhost.localdomain ([91.237.107.85]) by smtp.googlemail.com with ESMTPSA id i18sm9162243lfc.82.2019.11.04.13.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2019 13:37:23 -0800 (PST) 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, Leonid Maksymchuk Subject: [PATCH v2 1/3] platform/x86: asus_wmi: Fix return value of fan_boost_mode_store Date: Mon, 4 Nov 2019 23:37:07 +0200 Message-Id: <20191104213707.18170-1-leonmaxx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104213417.18036-1-leonmaxx@gmail.com> References: <20191104213417.18036-1-leonmaxx@gmail.com> MIME-Version: 1.0 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 21:38:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Maksymchuk X-Patchwork-Id: 11226553 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 8B9F015AB for ; Mon, 4 Nov 2019 21:38:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EF4820B7C for ; Mon, 4 Nov 2019 21:38:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZupAyKsl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728634AbfKDViq (ORCPT ); Mon, 4 Nov 2019 16:38:46 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:34134 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728766AbfKDVip (ORCPT ); Mon, 4 Nov 2019 16:38:45 -0500 Received: by mail-lf1-f67.google.com with SMTP id f5so13431294lfp.1; Mon, 04 Nov 2019 13:38:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9BkQFloRSV64INcQit1KezHLbgCAUZxVpxOp1Jw5hWA=; b=ZupAyKslevX7lHR58O2vVYahTOF8MjiPtfoUvO0B9MJROl8D31lMVJJPEXfYZFmO0a O9yY1724jEBcCNWXRWfm0onez+chxgPnsTCHYiPLLiw5Rtci5YRMy5oLYYYP45z6Se4y dLlJiDTZSK65MADgTlO2IY5zG2amJOc4QaK/yieu4aVaNi7r8kkMK8GdXif5WaUAPcaB eE2pwXHRtEv1bFz3ekfpbV6PanMUqXBmgTJ0eBYly3BC7ynF/lZd6oLI9LJw+bZoWOzM 7a9Mvr+rdOsGLKf//PVVxWhYr94yB21Owu44va9Rf5ssdhHHrYbQr2kWm7HWDukZJuXh L6nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9BkQFloRSV64INcQit1KezHLbgCAUZxVpxOp1Jw5hWA=; b=pZkJ+KLknvm8HXvA7Qq9+lz1dZN05MyhPKGifxuhk0cA2shuXo0cgMK/CpdAYb4ah0 /uqjswEd3eeLGd6FjBKyjqiF9PJSXhLjwaslkB2Akq6mYbLJ+RiT3hGFTper1xPfYzrT GSCrFdspxH/7c2YIvuc/kbXkkEIa/Tr6NQ2uPma13iD59aaADwfEdekIIVsz3WH1LaBG fpywUvW83ceMGUcOvSjBWhj9vFo93vCfy1RDuXBaA5fCYoukkK6Zbhs+B5kOgyRLjt2H Vuxf3G+oIWgBs2GkzM6ogpJrafoVVYvCFXJUuQZqN4qUft5SSGX4Znckwo4cN4QTc4Ko uwyw== X-Gm-Message-State: APjAAAWc4cMUbdcfFFlYACft+pbZARGEQGU8YEdtFzXsxU0UZ9YqPBUX 72ck6QFzwql7v281BmdKqYM81D3eH9Y= X-Google-Smtp-Source: APXvYqycZ2ltjnulbJQ/lZ7axjxbF88W5SJLV4KWAkukgWyHYsv8dtn+8K6Xw0EdRNhYnRjSf4na7g== X-Received: by 2002:a19:d7:: with SMTP id 206mr18034693lfa.22.1572903520163; Mon, 04 Nov 2019 13:38:40 -0800 (PST) Received: from localhost.localdomain ([91.237.107.85]) by smtp.googlemail.com with ESMTPSA id q124sm8182137ljb.28.2019.11.04.13.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2019 13:38:39 -0800 (PST) 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, Leonid Maksymchuk Subject: [PATCH v2 2/3] platform/x86: asus_wmi: Support fan boost mode on FX505DY/FX705DY Date: Mon, 4 Nov 2019 23:38:28 +0200 Message-Id: <20191104213828.18278-1-leonmaxx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104213417.18036-1-leonmaxx@gmail.com> References: <20191104213417.18036-1-leonmaxx@gmail.com> MIME-Version: 1.0 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 21:39: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: 11226555 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 E9C0D15AB for ; Mon, 4 Nov 2019 21:39:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C7ED220848 for ; Mon, 4 Nov 2019 21:39:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="V7oKkHMo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728377AbfKDVjV (ORCPT ); Mon, 4 Nov 2019 16:39:21 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:46765 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728766AbfKDVjV (ORCPT ); Mon, 4 Nov 2019 16:39:21 -0500 Received: by mail-lf1-f66.google.com with SMTP id 19so8252819lft.13; Mon, 04 Nov 2019 13:39:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iurp4sakzOCEdz++tzDZDRAOZsuv2t30XmhXJuaXI1U=; b=V7oKkHMo48znnhlUeslmupwVBtoFfTzrKpmJKOZ7+GR8cB5HkK5v7gRCY8oOU98ePO n6e4wnKhJBsl5lq/L2WafrwV1Dfir0Ya8UxYui1wSenHVF4Wvswm5YvfENhtwu+RUtWQ IKTFQquTERbrqyqDxEkhSPnQJDtG/ZhOPAfy/xTDPIVJO+pnoSSc8E8JSkUqij7J6aHy KDnRObG46BIz9gmsa3NS94PECc7oiZLEW2u/yjVNceqnymlaxu2m9iUX4eWU/yXg+iJg ZUKfDwzmbftjmPSBipp9q3rs5GU7ZVEF7HNQZ9c/0mwove38GXBDwXQA7AC7GYDm+I31 BcXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iurp4sakzOCEdz++tzDZDRAOZsuv2t30XmhXJuaXI1U=; b=IfR9TniLPVV9KEFpGGTeRWBAuY85XG1u3R4CzKQO3Je1r+rRqwc5Pn+sGK1SsJ93Hk RsPVK5O6bywVBLDbVD6lBzmMx/aiqR5h92pzasqndqbcsZpeJrLtJqVwOpd3eh/xrxvE lUpDxtp4hFxv4AwXho/d4bZ+WfTkuI+Sugf0bfD6sI/jnbN5jjNqAE3AcnTZKhQLUbd+ g5f0c2KjeyD13ndl/VVsZnInNOi1bPhSGmX/1RjOBpbMcWWOVCXZLwTC6e5aJ1xez2KA uMe9Koql8qT0BLAvcCVXThMzCw6mI8SAVq/WT738ICPE55JLe4tcLYcAu7qewxyKgnBn 7h7g== X-Gm-Message-State: APjAAAUkNY2Gbf++x3UyilkR2h5aMcBFB9n8eUJe2d8TvAM9mldyNG9a D4Dbg3/tmDx7YPSPPmnDc61ySEiCgX4= X-Google-Smtp-Source: APXvYqxy28+hFisUWybxv0Nvg95SfKtpcWfQve3kAeZQRS4e79YxeloNW8IjF2DPFEAtpBsPzPETvg== X-Received: by 2002:ac2:48af:: with SMTP id u15mr17754498lfg.151.1572903558796; Mon, 04 Nov 2019 13:39:18 -0800 (PST) Received: from localhost.localdomain ([91.237.107.85]) by smtp.googlemail.com with ESMTPSA id v21sm5708728ljh.53.2019.11.04.13.39.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2019 13:39:18 -0800 (PST) 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, Leonid Maksymchuk Subject: [PATCH v2 3/3] platform/x86: asus_wmi: Set default fan boost mode to normal Date: Mon, 4 Nov 2019 23:39:07 +0200 Message-Id: <20191104213907.18413-1-leonmaxx@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104213417.18036-1-leonmaxx@gmail.com> References: <20191104213417.18036-1-leonmaxx@gmail.com> MIME-Version: 1.0 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)