linux-yocto/Documentation
Daniel Lee 923638cea4 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:48:34 +02:00
..
ABI x86/vmscape: Enable the mitigation 2025-09-11 17:23:22 +02:00
accel
accounting
admin-guide platform/x86: lg-laptop: Fix WMAB call in fan_mode_store() 2025-10-02 13:48:34 +02:00
arch Add the mitigation logic for Transient Scheduler Attacks (TSA) 2025-07-07 17:08:36 -07:00
block Documentation: ublk: Separate UBLK_F_AUTO_BUF_REG fallback behavior sublists 2025-06-13 09:25:42 -06:00
bpf bpf: Adjust free target to avoid global starvation of LRU map 2025-06-18 18:50:14 -07:00
cdrom
core-api Kbuild updates for v6.16 2025-06-07 10:05:35 -07:00
cpu-freq
crypto
dev-tools
devicetree dt-bindings: serial: 8250: move a constraint 2025-09-25 11:16:53 +02:00
doc-guide Docs: doc-guide: update sphinx.rst Sphinx version number 2025-05-21 04:28:29 -06:00
driver-api Char/Misc/IIO pull request for 6.16-rc1 2025-06-06 11:50:47 -07:00
edac cxl/edac: Add CXL memory device soft PPR control feature 2025-05-23 13:25:06 -07:00
fault-injection
fb fbdev: sstfb.rst: Fix spelling mistake 2025-05-31 10:24:02 +02:00
features LoongArch: Enable ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS 2025-05-30 21:45:42 +08:00
filesystems fscrypt: Don't use problematic non-inline crypto engines 2025-08-20 18:40:48 +02:00
firmware_class
firmware-guide Documentation: ACPI: Fix parent device references 2025-08-20 18:40:48 +02:00
fpga
gpu Documentation: nouveau: Update GSP message queue kernel-doc reference 2025-06-13 16:46:35 +02:00
hid
hwmon hwmon: (ina238) Report energy in microjoules 2025-07-18 09:50:51 -07:00
i2c
iio docs: iio: ad3552r: fix malformed table 2025-05-21 14:19:46 +01:00
images
infiniband
input Input: amijoy - make headings compliant w/ guidelines in documentation 2025-05-30 15:34:38 -07:00
isdn
kbuild Kbuild updates for v6.16 2025-06-07 10:05:35 -07:00
kernel-hacking
leds LEDs for v6.16 2025-06-03 12:10:31 -07:00
litmus-tests
livepatch
locking
maintainer
mhi
misc-devices misc: amd-sbi: Add document for AMD SB IOCTL description 2025-05-21 14:44:41 +02:00
mm Docs/damon: update titles and brief introductions to explain DAMOS 2025-05-22 14:55:38 -07:00
netlabel
netlink mptcp: pm: nl: announce deny-join-id0 flag 2025-09-25 11:16:53 +02:00
networking docs: networking: can: change bcm_msg_head frames member to support flexible array 2025-09-19 16:37:36 +02:00
nvdimm
nvme
PCI Merge branch 'pci/misc' 2025-06-04 10:50:45 -05:00
pcmcia
peci
power
process docs: netdev: correct the heading level for co-posting selftests 2025-06-27 15:31:24 -07:00
RCU
rust Documentation: rust: testing: add docs on the new KUnit #[test] tests 2025-05-27 20:09:59 +02:00
scheduler sched_ext: Changes for v6.16 2025-05-27 21:12:50 -07:00
scsi
security
sound ASoC: doc: cs35l56: Add CS35L63 to the list of supported devices 2025-06-18 17:22:48 +01:00
sphinx sphinx: kernel_abi: fix performance regression with O=<dir> 2025-08-20 18:41:22 +02:00
sphinx-static
spi
staging rpmsg updates for v6.16 2025-06-02 11:06:44 -07:00
sunrpc/xdr
target
tee
timers
tools
trace Char/Misc/IIO pull request for 6.16-rc1 2025-06-06 11:50:47 -07:00
translations Kbuild updates for v6.16 2025-06-07 10:05:35 -07:00
usb
userspace-api LoongArch changes for v6.16 2025-06-07 09:56:18 -07:00
virt KVM TDX fixes for 6.16 2025-07-17 17:06:13 +02:00
w1
watchdog
wmi platform/x86: wmi: Update documentation of WCxx/WExx ACPI methods 2025-06-26 18:19:27 +03:00
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst