mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Sasha Levin" <sashal@kernel.org>,
	corentin.chary@gmail.com, markgross@kernel.org,
	acpi4asus-user@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org
Subject: [PATCH AUTOSEL 6.1 47/53] platform/x86: asus-wmi: Add quirk wmi_ignore_fan
Date: Mon, 16 Jan 2023 09:01:47 -0500	[thread overview]
Message-ID: <20230116140154.114951-47-sashal@kernel.org> (raw)
In-Reply-To: <20230116140154.114951-1-sashal@kernel.org>

From: Thomas Weißschuh <linux@weissschuh.net>

[ Upstream commit c874b6de4cdfa2822a07b479887cd5f87fb5d078 ]

Some laptops have a fan device listed in their ACPI tables but do not
actually contain a fan.
Introduce a quirk that can be used to override the fan detection logic.

This was observed with a ASUS VivoBook E410MA running firmware
E410MAB.304.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20221221-asus-fan-v1-1-e07f3949725b@weissschuh.net
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/asus-wmi.c | 4 +++-
 drivers/platform/x86/asus-wmi.h | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 872efc1d5b36..2d0b0805ff29 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2243,7 +2243,9 @@ static int asus_wmi_fan_init(struct asus_wmi *asus)
 	asus->fan_type = FAN_TYPE_NONE;
 	asus->agfn_pwm = -1;
 
-	if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_CPU_FAN_CTRL))
+	if (asus->driver->quirks->wmi_ignore_fan)
+		asus->fan_type = FAN_TYPE_NONE;
+	else if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_CPU_FAN_CTRL))
 		asus->fan_type = FAN_TYPE_SPEC83;
 	else if (asus_wmi_has_agfn_fan(asus))
 		asus->fan_type = FAN_TYPE_AGFN;
diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h
index 65316998b898..a478ebfd34df 100644
--- a/drivers/platform/x86/asus-wmi.h
+++ b/drivers/platform/x86/asus-wmi.h
@@ -38,6 +38,7 @@ struct quirk_entry {
 	bool store_backlight_power;
 	bool wmi_backlight_set_devstate;
 	bool wmi_force_als_set;
+	bool wmi_ignore_fan;
 	enum asus_wmi_tablet_switch_mode tablet_switch_mode;
 	int wapf;
 	/*
-- 
2.35.1


  parent reply	other threads:[~2023-01-16 14:09 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 14:01 [PATCH AUTOSEL 6.1 01/53] scsi: iscsi: Fix multiple iSCSI session unbind events sent to userspace Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 02/53] ASoC: SOF: pm: Set target state earlier Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 03/53] ASoC: SOF: pm: Always tear down pipelines before DSP suspend Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 04/53] ASoC: SOF: Add FW state to debugfs Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 05/53] ASoC: amd: yc: Add Razer Blade 14 2022 into DMI table Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 06/53] spi: cadence: Fix busy cycles calculation Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 07/53] cpufreq: CPPC: Add u64 casts to avoid overflowing Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 08/53] cpufreq: Add Tegra234 to cpufreq-dt-platdev blocklist Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 09/53] ASoC: mediatek: mt8186: support rt5682s_max98360 Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 10/53] ASoC: mediatek: mt8186: Add machine support for max98357a Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 11/53] ASoC: amd: yc: Add ASUS M5402RA into DMI table Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 12/53] ASoC: support machine driver with max98360 Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 13/53] kcsan: test: don't put the expect array on the stack Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 14/53] cpufreq: Add SM6375 to cpufreq-dt-platdev blocklist Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 15/53] ASoC: fsl_micfil: Correct the number of steps on SX controls Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 16/53] drm/msm/a6xx: Avoid gx gbit halt during rpm suspend Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 17/53] net: usb: cdc_ether: add support for Thales Cinterion PLS62-W modem Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 18/53] drm: Add orientation quirk for Lenovo ideapad D330-10IGL Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 19/53] s390/debug: add _ASM_S390_ prefix to header guard Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 20/53] s390: expicitly align _edata and _end symbols on page boundary Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 21/53] xen/pvcalls: free active map buffer on pvcalls_front_free_map Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 22/53] perf/x86/cstate: Add Meteor Lake support Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 23/53] perf/x86/msr: " Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 24/53] perf/x86/msr: Add Emerald Rapids Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 25/53] perf/x86/intel/uncore: " Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 26/53] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 27/53] nolibc: fix fd_set type Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 28/53] tools/nolibc: Fix S_ISxxx macros Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 29/53] tools/nolibc: fix missing includes causing build issues at -O0 Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 30/53] tools/nolibc: prevent gcc from making memset() loop over itself Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 31/53] cpufreq: armada-37xx: stop using 0 as NULL pointer Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 32/53] ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 33/53] ASoC: fsl-asoc-card: Fix naming of AC'97 CODEC widgets Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 34/53] ACPI: resource: Skip IRQ override on Asus Expertbook B2402CBA Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 35/53] drm/amdkfd: Add sync after creating vram bo Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 36/53] drm/amdkfd: Fix NULL pointer error for GC 11.0.1 on mGPU Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 37/53] cifs: fix potential memory leaks in session setup Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 38/53] spi: spidev: fix a race condition when accessing spidev->spi Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 39/53] spi: spidev: remove debug messages that access spidev->spi without locking Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 40/53] KVM: s390: interrupt: use READ_ONCE() before cmpxchg() Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 41/53] scsi: hisi_sas: Use abort task set to reset SAS disks when discovered Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 42/53] scsi: hisi_sas: Set a port invalid only if there are no devices attached when refreshing port id Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 43/53] r8152: add vendor/device ID pair for Microsoft Devkit Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 44/53] platform/x86: touchscreen_dmi: Add info for the CSL Panther Tab HD Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 45/53] platform/x86: asus-nb-wmi: Add alternate mapping for KEY_CAMERA Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 46/53] platform/x86: asus-nb-wmi: Add alternate mapping for KEY_SCREENLOCK Sasha Levin
2023-01-16 14:01 ` Sasha Levin [this message]
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 48/53] platform/x86: asus-wmi: Ignore fan on E410MA Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 49/53] platform/x86: simatic-ipc: correct name of a model Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 50/53] platform/x86: simatic-ipc: add another model Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 51/53] lockref: stop doing cpu_relax in the cmpxchg loop Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 52/53] ata: pata_cs5535: Don't build on UML Sasha Levin
2023-01-16 14:01 ` [PATCH AUTOSEL 6.1 53/53] firmware: coreboot: Check size of table entry and use flex-array Sasha Levin

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=20230116140154.114951-47-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=corentin.chary@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=stable@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®