aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86
Commit message (Collapse)AuthorAgeFilesLines
* platform/x86: ideapad-laptop: add support for some new buttonsGašper Nemgar2025-04-231-0/+16
| | | | | | | | | | | | Add entries to unsupported WMI codes in ideapad_keymap[] and one check for WMI code 0x13d to trigger platform_profile_cycle(). Signed-off-by: Gašper Nemgar <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ij: joined nested if ()s & major tweaks to changelog] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: asus-wmi: Disable OOBE state after resume from hibernationPavel Nikulin2025-04-231-1/+10
| | | | | | | | | | | ASUS firmware resets OOBE state during S4 suspend, so the keyboard blinks during resume from hibernation. This patch disables OOBE state after resume from hibernation. Signed-off-by: Pavel Nikulin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: alienware-wmi-wmax: Add support for Alienware m15 R7Kurt Borja2025-04-231-0/+8
| | | | | | | | | | | Extend thermal control support to Alienware m15 R7. Cc: [email protected] Tested-by: Romain THERY <[email protected]> Signed-off-by: Kurt Borja <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86/intel: hid: Add Pantherlake supportSaranya Gopal2025-04-231-10/+11
| | | | | | | | | | | | | Add Pantherlake ACPI device ID to the Intel HID driver. While there, clean up the device ID table to remove the ", 0" parts. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Saranya Gopal <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: alienware-wmi-wmax: Fix uninitialized variable due to bad ↵Kurt Borja2025-04-171-4/+2
| | | | | | | | | | | | | | | | | error handling wmax_thermal_information() may also return -ENOMSG, which would leave `id` uninitialized in thermal_profile_probe. Reorder and modify logic to catch all errors. Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/r/[email protected] Fixes: 27e9e6339896 ("platform/x86: alienware-wmi: Refactor thermal control methods") Signed-off-by: Kurt Borja <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86/intel-uncore-freq: Fix missing uncore sysfs during CPU hotplugShouye Liu2025-04-171-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | In certain situations, the sysfs for uncore may not be present when all CPUs in a package are offlined and then brought back online after boot. This issue can occur if there is an error in adding the sysfs entry due to a memory allocation failure. Retrying to bring the CPUs online will not resolve the issue, as the uncore_cpu_mask is already set for the package before the failure condition occurs. This issue does not occur if the failure happens during module initialization, as the module will fail to load in the event of any error. To address this, ensure that the uncore_cpu_mask is not set until the successful return of uncore_freq_add_entry(). Fixes: dbce412a7733 ("platform/x86/intel-uncore-freq: Split common and enumeration part") Signed-off-by: Shouye Liu <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86/amd: pmc: Require at least 2.5 seconds between HW sleep cyclesMario Limonciello2025-04-171-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | When an APU exits HW sleep with no active wake sources the Linux kernel will rapidly assert that the APU can enter back into HW sleep. This happens in a few ms. Contrasting this to Windows, Windows can take 10s of seconds to enter back into the resiliency phase for Modern Standby. For some situations this can be problematic because it can cause leakage from VDDCR_SOC to VDD_MISC and force VDD_MISC outside of the electrical design guide specifications. On some designs this will trip the over voltage protection feature (OVP) of the voltage regulator module, but it could cause APU damage as well. To prevent this risk, add an explicit sleep call so that future attempts to enter into HW sleep will have enough time to settle. This will occur while the screen is dark and only on cases that the APU should enter HW sleep again, so it shouldn't be noticeable to any user. Cc: [email protected] Signed-off-by: Mario Limonciello <[email protected]> Acked-by: Shyam Sundar S K <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: msi-wmi-platform: Workaround a ACPI firmware bugArmin Wolf2025-04-161-32/+59
| | | | | | | | | | | | | | | | | | | | The ACPI byte code inside the ACPI control method responsible for handling the WMI method calls uses a global buffer for constructing the return value, yet the ACPI control method itself is not marked as "Serialized". This means that calling WMI methods on this WMI device is not thread-safe, as concurrent WMI method calls will corrupt the global buffer. Fix this by serializing the WMI method calls using a mutex. Cc: [email protected] # 6.x.x: 912d614ac99e: platform/x86: msi-wmi-platform: Rename "data" variable Fixes: 9c0beb6b29e7 ("platform/x86: wmi: Add MSI WMI Platform driver") Tested-by: Antheas Kapenekakis <[email protected]> Signed-off-by: Armin Wolf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: msi-wmi-platform: Rename "data" variableArmin Wolf2025-04-151-4/+4
| | | | | | | | | | | Rename the "data" variable inside msi_wmi_platform_read() to avoid a name collision when the driver adds support for a state container struct (that is to be called "data" too) in the future. Signed-off-by: Armin Wolf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: alienware-wmi-wmax: Extend support to more laptopsKurt Borja2025-04-151-0/+48
| | | | | | | | | | | | | | | | Extend thermal control support to: - Alienware Area-51m R2 - Alienware m16 R1 - Alienware m16 R2 - Dell G16 7630 - Dell G5 5505 SE Cc: [email protected] Signed-off-by: Kurt Borja <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: alienware-wmi-wmax: Add G-Mode support to Alienware m16 R1Kurt Borja2025-04-151-1/+1
| | | | | | | | | | | Some users report the Alienware m16 R1 models, support G-Mode. This was manually verified by inspecting their ACPI tables. Cc: [email protected] Signed-off-by: Kurt Borja <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: amd: pmf: Fix STT limitsMario Limonciello2025-04-116-12/+33
| | | | | | | | | | | | | | | | | | On some platforms it has been observed that STT limits are not being applied properly causing poor performance as power limits are set too low. STT limits that are sent to the platform are supposed to be in Q8.8 format. Convert them before sending. Reported-by: Yijun Shen <[email protected]> Fixes: 7c45534afa443 ("platform/x86/amd/pmf: Add support for PMF Policy Binary") Cc: [email protected] Tested-by: Yijun Shen <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Acked-by: Shyam Sundar S K <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: x86-android-tablets: Add Vexia Edu Atla 10 tablet 5V dataHans de Goede2025-04-113-0/+73
| | | | | | | | | | | | | | | | | | | | | The Vexia EDU ATLA 10 tablet comes in 2 different versions with significantly different mainboards. The only outward difference is that the charging barrel on one is marked 5V and the other is marked 9V. Both are x86 ACPI tablets which ships with Android x86 as factory OS. with a DSDT which contains a bunch of I2C devices which are not actually there, causing various resource conflicts. Enumeration of these is skipped through the acpi_quirk_skip_i2c_client_enumeration(). Extend the existing support for the 9V version by adding support for manually instantiating the I2C devices which are actually present on the 5V version by adding the necessary device info to the x86-android-tablets module. Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: x86-android-tablets: Add "9v" to Vexia EDU ATLA 10 tablet symbolsHans de Goede2025-04-113-34/+34
| | | | | | | | | | | | | | | | | The Vexia EDU ATLA 10 tablet comes in 2 different versions with significantly different mainboards. The only outward difference is that the charging barrel on one is marked 5V and the other is marked 9V. Both need to be handled by the x86-android-tablets code. Add 9v to the symbols for the existing support for the 9V Vexia EDU ATLA 10 tablet symbols to prepare for adding support for the 5V version. All this patch does is s/vexia_edu_atla10_info/vexia_edu_atla10_9v_info/. Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* asus-laptop: Fix an uninitialized variableDenis Arefev2025-04-111-3/+6
| | | | | | | | | | | | | | | | | | | | | | The value returned by acpi_evaluate_integer() is not checked, but the result is not always successful, so it is necessary to add a check of the returned value. If the result remains negative during three iterations of the loop, then the uninitialized variable 'val' will be used in the clamp_val() macro, so it must be initialized with the current value of the 'curr' variable. In this case, the algorithm should be less noisy. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: b23910c2194e ("asus-laptop: Pegatron Lucid accelerometer") Cc: [email protected] Signed-off-by: Denis Arefev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* treewide: Switch/rename to timer_delete[_sync]()Thomas Gleixner2025-04-052-2/+2
| | | | | | | | | | timer_delete[_sync]() replaces del_timer[_sync](). Convert the whole tree over and remove the historical wrapper inlines. Conversion was done with coccinelle plus manual fixups where necessary. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
* MAINTAINERS: consistently use my dedicated email addressThomas Weißschuh2025-04-011-2/+2
| | | | | | | | | | | | | | | | I use a dedicated address for kernel development. Unfortunately at some point I used another address and later copied it around to other places. Consistently use the dedicated address everywhere. As the old address does in fact work, an update to mailmap is not necessary. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: ISST: Correct command storage data lengthSrinivas Pandruvada2025-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | After resume/online turbo limit ratio (TRL) is restored partially if the admin explicitly changed TRL from user space. A hash table is used to store SST mail box and MSR settings when modified to restore those settings after resume or online. This uses a struct isst_cmd field "data" to store these settings. This is a 64 bit field. But isst_store_new_cmd() is only assigning as u32. This results in truncation of 32 bits. Change the argument to u64 from u32. Fixes: f607874f35cb ("platform/x86: ISST: Restore state on resume") Signed-off-by: Srinivas Pandruvada <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: thinkpad_acpi: disable ACPI fan access for T495* and E560Eduard Christian Dumitrescu2025-04-011-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | T495, T495s, and E560 laptops have the FANG+FANW ACPI methods (therefore fang_handle and fanw_handle are not NULL) but they do not actually work, which results in a "No such device or address" error. The DSDT table code for the FANG+FANW methods doesn't seem to do anything special regarding the fan being secondary. The bug was introduced in commit 57d0557dfa49 ("platform/x86: thinkpad_acpi: Add Thinkpad Edge E531 fan support"), which added a new fan control method via the FANG+FANW ACPI methods. Add a quirk for T495, T495s, and E560 to avoid the FANG+FANW methods. Fan access and control is restored after forcing the legacy non-ACPI fan control method by setting both fang_handle and fanw_handle to NULL. Reported-by: Vlastimil Holer <[email protected]> Fixes: 57d0557dfa49 ("platform/x86: thinkpad_acpi: Add Thinkpad Edge E531 fan support") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219643 Cc: [email protected] Tested-by: Alireza Elikahi <[email protected]> Reviewed-by: Kurt Borja <[email protected]> Signed-off-by: Eduard Christian Dumitrescu <[email protected]> Co-developed-by: Seyediman Seyedarab <[email protected]> Signed-off-by: Seyediman Seyedarab <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* platform/x86: thinkpad_acpi: Fix NULL pointer dereferences while probingKurt Borja2025-04-011-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some subdrivers make use of the global reference tpacpi_pdev during initialization, which is called from the platform driver's probe. However, after the commit 38b9ab80db31 ("platform/x86: thinkpad_acpi: Move subdriver initialization to tpacpi_pdriver's probe.") this variable is only properly initialized *after* probing and this can result in a NULL pointer dereference. In order to fix this without reverting the commit, register the platform bundle in two steps, first create and initialize tpacpi_pdev, then register the driver synchronously with platform_driver_probe(). This way the benefits of commit 38b9ab80db31 are preserved. Additionally, the commit 43fc63a1e8f6 ("platform/x86: thinkpad_acpi: Move HWMON initialization to tpacpi_hwmon_pdriver's probe") introduced a similar problem, however tpacpi_sensors_pdev is only used once inside the probe, so replace the global reference with the one given by the probe. Reported-by: Damian Tometzki <[email protected]> Closes: https://lore.kernel.org/r/CAL=B37kdL1orSQZD2A3skDOevRXBzF__cJJgY_GFh9LZO3FMsw@mail.gmail.com/ Fixes: 38b9ab80db31 ("platform/x86: thinkpad_acpi: Move subdriver initialization to tpacpi_pdriver's probe.") Fixes: 43fc63a1e8f6 ("platform/x86: thinkpad_acpi: Move HWMON initialization to tpacpi_hwmon_pdriver's probe") Tested-by: Damian Tometzki <[email protected]> Tested-by: Gene C <[email protected]> Signed-off-by: Kurt Borja <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
* Merge tag 'platform-drivers-x86-v6.15-1' of ↵Linus Torvalds2025-03-2647-8826/+4484
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform drivers updates from Ilpo Järvinen: - alienware-wmi: - Refactor and split WMAX/legacy drivers - dell-ddv: - Correct +0.1 offset in temperature - Use the power supply extension mechanism for battery temperatures - intel/pmc: - Refactor init to mostly use a common init function - Add support for Arrow Lake U/H - Add support for Panther Lake - intel/sst: - Improve multi die handling - Prefix header search path with sysroot (fixes cross-compiling) - lenovo-wmi-hotkey-utilities: - Support for mic & audio mute LEDs - samsung-galaxybook: - Add driver for Samsung Galaxy Book series - wmi: - Rework WCxx/WExx ACPI method handling - Enable data block collection when the data block is set - platform/arm: - Add Huawei Matebook E Go EC driver - platform/mellanox: - Relocate to drivers/platform/mellanox/ - mlxbf-bootctl: - RTC battery status sysfs support - Miscellaneous cleanups / refactoring / improvements * tag 'platform-drivers-x86-v6.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (75 commits) platform/x86: x86-android-tablets: Add select POWER_SUPPLY to Kconfig platform/x86/amd/pmf: convert timeouts to secs_to_jiffies() platform/x86: thinkpad_acpi: convert timeouts to secs_to_jiffies() irqdomain: platform/x86: Switch to irq_domain_create_linear() platform/x86/amd/pmc: fix leak in probe() tools/power/x86/intel-speed-select: v1.22 release tools/power/x86/intel-speed-select: Prefix header search path with sysroot tools/power/x86/intel-speed-select: Die ID for IO dies tools/power/x86/intel-speed-select: Fix the condition to check multi die system tools/power/x86/intel-speed-select: Prevent increasing MAX_DIE_PER_PACKAGE platform/x86/amd/pmc: Use managed APIs for mutex platform/x86/amd/pmc: Remove unnecessary line breaks platform/x86/amd/pmc: Move macros and structures to the PMC header file platform/x86/amd/pmc: Notify user when platform does not support s0ix transition platform/x86: dell-ddv: Use the power supply extension mechanism platform/x86: dell-ddv: Use devm_battery_hook_register platform/x86: dell-ddv: Fix temperature calculation platform/x86: thinkpad_acpi: check the return value of devm_mutex_init() platform/x86: samsung-galaxybook: Fix block_recording not supported logic platform/x86: dell-uart-backlight: Make dell_uart_bl_serdev_driver static ...
| * platform/x86: x86-android-tablets: Add select POWER_SUPPLY to KconfigHans de Goede2025-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit c78dd25138d1 ("platform/x86: x86-android-tablets: Add Vexia EDU ATLA 10 EC battery driver"), adds power_supply class registering to the x86-android-tablets code. Add "select POWER_SUPPLY" to the Kconfig entry to avoid these errors: ERROR: modpost: "power_supply_get_drvdata" [drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.ko] undefined! ERROR: modpost: "power_supply_changed" [drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.ko] undefined! ERROR: modpost: "devm_power_supply_register" [drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.ko] undefined! When POWER_SUPPLY support is not enabled. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86/amd/pmf: convert timeouts to secs_to_jiffies()Easwar Hariharan2025-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies() to avoid the multiplication This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following Coccinelle rules: @depends on patch@ expression E; @@ -msecs_to_jiffies +secs_to_jiffies (E - * \( 1000 \| MSEC_PER_SEC \) ) Signed-off-by: Easwar Hariharan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Link: https://lore.kernel.org/r/20250225-converge-secs-to-jiffies-part-two-v3-14-a43967e36c88@linux.microsoft.com Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: thinkpad_acpi: convert timeouts to secs_to_jiffies()Easwar Hariharan2025-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies() to avoid the multiplication This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following Coccinelle rules: @depends on patch@ expression E; @@ -msecs_to_jiffies +secs_to_jiffies (E - * \( 1000 \| MSEC_PER_SEC \) ) Signed-off-by: Easwar Hariharan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Link: https://lore.kernel.org/r/20250225-converge-secs-to-jiffies-part-two-v3-15-a43967e36c88@linux.microsoft.com Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * irqdomain: platform/x86: Switch to irq_domain_create_linear()Jiri Slaby (SUSE)2025-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. The first parameter is NULL here so nothing else needs to be done. Signed-off-by: Jiri Slaby (SUSE) <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ij: Removed unnecessary details from the commit message.] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86/amd/pmc: fix leak in probe()Dan Carpenter2025-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | Call pci_dev_put(rdev) before returning. Fixes: 6ad1b2dc0f2a ("platform/x86/amd/pmc: Use managed APIs for mutex") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86/amd/pmc: Use managed APIs for mutexShyam Sundar S K2025-03-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Adopt managed devm_* APIs for handling mutex creation and deletion, facilitating automatic resource cleanup. Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[email protected]> Signed-off-by: Shyam Sundar S K <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86/amd/pmc: Remove unnecessary line breaksShyam Sundar S K2025-03-071-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enhance code readability by fixing line break and blank line inconsistencies. Also make the return variable "rc" as function level local. Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[email protected]> Signed-off-by: Shyam Sundar S K <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86/amd/pmc: Move macros and structures to the PMC header fileShyam Sundar S K2025-03-072-81/+81
| | | | | | | | | | | | | | | | | | | | | | | | To improve the code organization and readability, move the macros and structures from the AMD PMC driver to the PMC header file. Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[email protected]> Signed-off-by: Shyam Sundar S K <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86/amd/pmc: Notify user when platform does not support s0ix transitionShyam Sundar S K2025-03-072-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Some of the AMD platforms do not support modern standby, so when such CPU ID is detected, a warning message will be displayed to the user. Reviewed-by: Mario Limonciello <[email protected]> Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[email protected]> Signed-off-by: Shyam Sundar S K <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: dell-ddv: Use the power supply extension mechanismArmin Wolf2025-03-071-30/+45
| | | | | | | | | | | | | | | | | | | | | | | | Use the power supply extension mechanism for registering the battery temperature properties so that they can show up in the hwmon device associated with the ACPI battery. Signed-off-by: Armin Wolf <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: dell-ddv: Use devm_battery_hook_registerArmin Wolf2025-03-071-10/+1
| | | | | | | | | | | | | | | | | | | | | | Use devm_battery_hook_register() instead of manually calling devm_add_action_or_reset() to simplify the code. Signed-off-by: Armin Wolf <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: dell-ddv: Fix temperature calculationArmin Wolf2025-03-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the Dell Inspiron 3505 the battery temperature is always 0.1 degrees larger than the temperature show inside the OEM application. Emulate this behaviour to avoid showing strange looking values like 29.1 degrees. Fixes: 0331b1b0ba653 ("platform/x86: dell-ddv: Fix temperature scaling") Signed-off-by: Armin Wolf <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: thinkpad_acpi: check the return value of devm_mutex_init()Bartosz Golaszewski2025-03-051-1/+3
| | | | | | | | | | | | | | | | | | | | devm_mutex_init() can fail so check its return value. Fixes: 38b9ab80db31 ("platform/x86: thinkpad_acpi: Move subdriver initialization to tpacpi_pdriver's probe.") Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: samsung-galaxybook: Fix block_recording not supported logicJoshua Grisham2025-03-051-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes logic error when block_recording is not supported but the fw attr was being added anyway (reported by GitHub user bbregeault). Tested myself on a Samsung Galaxy Book2 Pro (has block_recording) and by bbregeault on a Galaxy Book2 Business (does not have block_recording). Fixes: 56f529ce4370 ("platform/x86: samsung-galaxybook: Add samsung-galaxybook driver") Signed-off-by: Joshua Grisham <[email protected]> Reviewed-by: Armin Wolf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: dell-uart-backlight: Make dell_uart_bl_serdev_driver staticIlpo Järvinen2025-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sparse reports: dell-uart-backlight.c:328:29: warning: symbol 'dell_uart_bl_serdev_driver' was not declared. Should it be static? Fix it by making the symbol static. Fixes: 484bae9e4d6ac ("platform/x86: Add new Dell UART backlight driver") Reviewed-by: Mario Limonciello <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]>
| * platform/x86: lenovo-yoga-tab2-pro-1380-fastcharger: Make symbol staticIlpo Järvinen2025-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sparse reports: lenovo-yoga-tab2-pro-1380-fastcharger.c:222:29: warning: symbol 'yt2_1380_fc_serdev_driver' was not declared. Should it be static? Fix that by making the symbol static. Fixes: b2ed33e8d486a ("platform/x86: Add lenovo-yoga-tab2-pro-1380-fastcharger driver") Reviewed-by: Mario Limonciello <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]>
| * platform/x86:lenovo-wmi-hotkey-utilities.c: Support for mic and audio mute LEDsJackie Dong2025-03-033-0/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement Lenovo utility data WMI calls needed to make LEDs work on Ideapads that support this GUID. This enables the mic and audio LEDs to be updated correctly. Tested on below samples. ThinkBook 13X Gen4 IMH ThinkBook 14 G6 ABP ThinkBook 16p Gen4-21J8 ThinkBook 16 G8 IRL ThinkBook 16 G7+ ASP Signed-off-by: Jackie Dong <[email protected]> Suggested-by: Mark Pearson <[email protected]> Reviewed-by: Kurt Borja <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Reviewed-by: Armin Wolf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: hp-bioscfg: Replace deprecated strncpy() with strscpy()Thorsten Blum2025-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since kstrtol() requires a NUL-terminated string as input and strncpy() is deprecated for NUL-terminated destination buffers, use strscpy() instead. Compile-tested only. Link: https://github.com/KSPP/linux/issues/90 Cc: [email protected] Signed-off-by: Thorsten Blum <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: intel: Use *-y instead of *-objs in MakefileKurt Borja2025-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The `objs` suffix is reserved for user-space tools. Use the `y` suffix instead, which is usually used for kernel drivers. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Kurt Borja <[email protected]> Reviewed-by: Jithu Joseph <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: hp: Use *-y instead of *-objs in MakefileKurt Borja2025-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The `objs` suffix is reserved for user-space tools. Use the `y` suffix instead, which is usually used for kernel drivers. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Kurt Borja <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: amd: Use *-y instead of *-objs in MakefilesKurt Borja2025-02-244-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The `objs` suffix is reserved for user-space tools. Use the `y` suffix instead, which is usually used for kernel drivers. While at it, fix alignment in AMD PMC and PMF Makefiles. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Kurt Borja <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: dell: dell-wmi-sysman: Use *-y instead of *-objs in MakefileKurt Borja2025-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The `objs` suffix is reserved for user-space tools. Use the `y` suffix instead, which is usually used for kernel drivers. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Kurt Borja <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: thinkpad_acpi: Move HWMON initialization to ↵Kurt Borja2025-02-241-27/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tpacpi_hwmon_pdriver's probe Let the driver core manage the lifetime of the HWMON device, by registering it inside tpacpi_hwmon_pdriver's probe and using devm_hwmon_device_register_with_groups(). Signed-off-by: Kurt Borja <[email protected]> Reviewed-by: Mark Pearson <[email protected]> Tested-by: Mark Pearson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: thinkpad_acpi: Move subdriver initialization to ↵Kurt Borja2025-02-241-74/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tpacpi_pdriver's probe. It was reported that if subdrivers assigned devres resources inside ibm_init_struct's .init callbacks, driver binding would fail with the following error message: platform thinkpad_acpi: Resources present before probing Let the driver core manage the lifetimes of the subdrivers and children devices, by initializing them inside tpacpi_driver's .probe callback. This is appropriate because these subdrivers usually expose sysfs groups and the driver core manages this automatically to avoid races. One immediate benefit of this, is that we are now able to use devres inside .init subdriver callbacks. platform_create_bundle is specifically used because it makes the driver's probe type synchronous and returns an ERR_PTR if attachment failed. Additionally, to make error handling simpler, allocate the input device using devm_input_allocate_device(). Reported-by: Mark Pearson <[email protected]> Closes: https://lore.kernel.org/platform-driver-x86/[email protected]/#t Reviewed-by: Mark Pearson <[email protected]> Tested-by: Mark Pearson <[email protected]> Signed-off-by: Kurt Borja <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86/intel/pmc: Remove unneeded extern keyword in headerXi Pardee2025-02-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | Remove unneeded extern keyword in header file. Functions are extern by default so extern keyword is not unnecessary for function declaration. Signed-off-by: Xi Pardee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86/intel/pmc: Remove unnecessary declarations in headerXi Pardee2025-02-249-248/+122
| | | | | | | | | | | | | | | | | | | | | | Remove unnecessary declarations in header file. Variable that are used by only one .c file are removed from header file and changed to be static in their corresponding .c file. Signed-off-by: Xi Pardee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86/intel/pmc: Add Panther Lake support to intel_pmc_coreXi Pardee2025-02-244-1/+561
| | | | | | | | | | | | | | | | | | | | Add Panther Lake support to intel_pmc_core driver Signed-off-by: Rajvi Jingar <[email protected]> Signed-off-by: Xi Pardee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: wmi: Call WCxx methods when setting data blocksArmin Wolf2025-02-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After performing some tests with a custom SSDT table available at https://github.com/Wer-Wolf/acpi-wmi-ssdt i found out that Windows also enables data block collection even when the data block is being set. Emulate this behaviour to avoid confusing the ACPI firmware. The bus-based API already implements this behaviour, so only the legacy GUID-based API needs to be changed. Signed-off-by: Armin Wolf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
| * platform/x86: wmi: Rework WCxx/WExx ACPI method handlingArmin Wolf2025-02-241-60/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handling of the WExx ACPI methods used for enabling and disabling WMI events has multiple flaws: - the ACPI methods are called even when the WMI device has not been marked as expensive. - WExx ACPI methods might be called for inappropriate WMI devices. - the error code AE_NOT_FOUND is treated as success. The handling of the WCxx ACPI methods used for enabling and disabling WMI data blocks is also flawed: - WMI data blocks are enabled and disabled for every single "query" operation. This is racy and inefficient. Unify the handling of both ACPI methods by introducing a common helper function for enabling and disabling WMI devices. Also enable/disable WMI data blocks during probe/remove and shutdown to match the handling of WMI events. Legacy GUID-based functions still have to enable/disable the WMI device manually and thus still suffer from a potential race condition. Since those functions are deprecated and suffer from various other flaws this issue is purposefully not fixed. Signed-off-by: Armin Wolf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>