linux-yocto/Documentation
Daniel Lee 26923ea48e platform/x86: lg-laptop: Fix WMAB call in fan_mode_store()
[ Upstream commit 3ed17349f18774c24505b0c21dfbd3cc4f126518 ]

When WMAB is called to set the fan mode, the new mode is read from either
bits 0-1 or bits 4-5 (depending on the value of some other EC register).
Thus when WMAB is called with bits 4-5 zeroed and called again with
bits 0-1 zeroed, the second call undoes the effect of the first call.
This causes writes to /sys/devices/platform/lg-laptop/fan_mode to have
no effect (and causes reads to always report a status of zero).

Fix this by calling WMAB once, with the mode set in bits 0,1 and 4,5.
When the fan mode is returned from WMAB it always has this form, so
there is no need to preserve the other bits.  As a bonus, the driver
now supports the "Performance" fan mode seen in the LG-provided Windows
control app, which provides less aggressive CPU throttling but louder
fan noise and shorter battery life.

Also, correct the documentation to reflect that 0 corresponds to the
default mode (what the Windows app calls "Optimal") and 1 corresponds
to the silent mode.

Fixes: dbf0c5a6b1 ("platform/x86: Add LG Gram laptop special features driver")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=204913#c4
Signed-off-by: Daniel Lee <dany97@live.ca>
Link: https://patch.msgid.link/MN2PR06MB55989CB10E91C8DA00EE868DDC1CA@MN2PR06MB5598.namprd06.prod.outlook.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-02 13:44:12 +02:00
..
ABI x86/vmscape: Enable the mitigation 2025-09-11 17:21:46 +02:00
accel accel/qaic: Add AIC080 support 2024-12-14 20:03:46 +01:00
accounting docs: psi: use correct config name 2023-07-31 09:54:17 -06:00
admin-guide platform/x86: lg-laptop: Fix WMAB call in fan_mode_store() 2025-10-02 13:44:12 +02:00
arch x86/bugs: Rename MDS machinery to something more generic 2025-07-10 16:05:14 +02:00
block docs: block: Fix grammar and spelling mistakes in bfq-iosched.rst 2024-09-05 14:38:10 -06:00
bpf bpf: Adjust free target to avoid global starvation of LRU map 2025-07-17 18:37:22 +02:00
cdrom
core-api module: Provide EXPORT_SYMBOL_GPL_FOR_MODULES() helper 2025-07-10 16:05:08 +02:00
cpu-freq
crypto
dev-tools The core clk framework is left largely untouched this time around except for 2024-09-23 15:01:48 -07:00
devicetree dt-bindings: serial: brcm,bcm7271-uart: Constrain clocks 2025-09-19 16:35:48 +02:00
doc-guide
driver-api serial: mctrl_gpio: split disable_ms into sync and no_sync APIs 2025-05-29 11:02:45 +02:00
fault-injection
fb
features
filesystems nfs/localio: add direct IO enablement with sync and async IO support 2025-09-19 16:35:43 +02:00
firmware_class
firmware-guide Documentation: ACPI: Fix parent device references 2025-08-20 18:30:15 +02:00
fpga
gpu drm/xe: Make xe_gt_freq part of the Documentation 2025-06-19 15:32:14 +02:00
hid Documentation: hid: intel-ish-hid: Add vendor custom firmware loading 2024-08-19 21:12:27 +02:00
hwmon hwmon: (dell-smm) Increment the number of fans 2025-05-29 11:02:22 +02:00
i2c i2c: i801: Add support for Intel Panther Lake 2024-12-14 20:03:55 +01:00
iio docs: iio: ad7380: fix supply for ad7380-4 2024-10-24 18:30:47 +01:00
images
infiniband
input
isdn Documentation: isdn: correct spelling 2023-02-10 16:28:13 -08:00
kbuild kbuild: rust: add rustc-min-version support function 2025-06-27 11:11:40 +01:00
kernel-hacking
leds - Limited LED current based on thermal conditions in the QCOM flash LED driver. 2024-09-23 14:20:11 -07:00
litmus-tests
livepatch
locking kcsan, seqlock: Support seqcount_latch_t 2024-12-05 14:01:22 +01:00
maintainer
mhi
misc-devices
mm Docs/damon/maintainer-profile: update deprecated awslabs GitHub URLs 2024-10-17 00:28:09 -07:00
netlabel
netlink mptcp: pm: nl: announce deny-join-id0 flag 2025-09-25 11:13:50 +02:00
networking docs: networking: can: change bcm_msg_head frames member to support flexible array 2025-09-19 16:35:49 +02:00
nvdimm nvdimm: fixes to maintainter-entry-profile 2020-05-25 10:19:19 -06:00
nvme Remove duplicate "and" in 'Linux NVMe docs. 2024-09-10 15:44:20 -06:00
PCI Documentation: PCI: fix typo in pci.rst 2024-09-10 15:30:42 -06:00
pcmcia Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
peci
power Documentation: PM: Clarify pm_runtime_resume_and_get() return value 2024-12-19 18:13:15 +01:00
process soc: fixes for 6.12 2024-10-17 09:43:36 -07:00
RCU doc: rcu: update printed dynticks counter bits 2024-12-05 14:01:19 +01:00
rust rust: remove leftover mentions of the alloc crate 2025-03-22 12:54:23 -07:00
scheduler sched_ext: Documentation: Update instructions for running example schedulers 2024-10-08 08:49:18 -10:00
scsi
security landlock: Fix grammar issues in documentation 2024-10-21 20:36:26 +02:00
sound
sphinx docs: kerneldoc-preamble.sty: Suppress extra spaces in CJK literal blocks 2024-09-05 14:16:41 -06:00
sphinx-static
spi
staging xz: remove XZ_EXTERN and extern from functions 2024-09-01 20:43:27 -07:00
target
tee
timers treewide: Fix wrong singular form of jiffies in comments 2024-09-08 20:47:40 +02:00
tools
trace
translations module: Convert default symbol namespace to string literal 2025-02-08 09:57:05 +01:00
usb
userspace-api Landlock fix for v6.12-rc7 2024-11-12 13:01:09 -08:00
virt KVM: x86: Clean up documentation for KVM_X86_QUIRK_SLOT_ZAP_ALL 2024-10-20 07:31:05 -04:00
w1 w1: add UART w1 bus driver 2024-02-15 15:02:33 +01:00
watchdog [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
wmi platform/x86: msi-wmi-platform: Workaround a ACPI firmware bug 2025-04-25 10:48:04 +02:00
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf doc-rst: Add missing newline at end of file 2019-06-20 14:16:56 -06:00
dontdiff Kbuild updates for v6.12 2024-09-24 13:02:06 -07:00
index.rst doc: fix spelling about ReStructured Text 2024-04-02 10:07:51 -06:00
Kconfig Documentation: Avoid duplicate Kconfig inclusion 2023-01-19 13:56:34 -07:00
Makefile
memory-barriers.txt docs/memory-barriers.txt: Remove left-over references to "CACHE COHERENCY" 2024-09-13 23:56:44 -07:00
SubmittingPatches
subsystem-apis.rst docs: Fix subsystem APIs page so ungrouped entries have their own header 2024-01-30 14:02:32 -07:00