mirror-linux/Documentation/admin-guide/laptops
Daniel Lee 3ed17349f1
platform/x86: lg-laptop: Fix WMAB call in fan_mode_store()
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>
2025-09-25 12:21:43 +03:00
..
alienware-wmi.rst Documentation: admin-guide: laptops: Add documentation for alienware-wmi 2025-04-11 13:10:16 +03:00
asus-laptop.rst
disk-shock-protection.rst Replace HTTP links with HTTPS ones: Documentation/admin-guide 2020-07-05 14:13:00 -06:00
index.rst Documentation: admin-guide: laptops: Add documentation for alienware-wmi 2025-04-11 13:10:16 +03:00
laptop-mode.rst block_dump: remove comments in docs 2021-05-24 06:47:21 -06:00
lg-laptop.rst platform/x86: lg-laptop: Fix WMAB call in fan_mode_store() 2025-09-25 12:21:43 +03:00
samsung-galaxybook.rst platform/x86: samsung-galaxybook: Add samsung-galaxybook driver 2025-02-07 13:57:03 +02:00
sony-laptop.rst
sonypi.rst Replace HTTP links with HTTPS ones: Documentation/admin-guide 2020-07-05 14:13:00 -06:00
thinkpad-acpi.rst platform/x86: thinkpad-acpi: Add support for hotkey 0x1401 2024-12-29 16:55:10 +02:00
toshiba_haps.rst