Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'platform-drivers-x86-v6.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Ilpo Järvinen:

- thinkpad_acpi:
- Fix NULL pointer dereferences while probing
- Disable ACPI fan access for T495* and E560

- ISST: Correct command storage data length

* tag 'platform-drivers-x86-v6.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
MAINTAINERS: consistently use my dedicated email address
platform/x86: ISST: Correct command storage data length
platform/x86: thinkpad_acpi: disable ACPI fan access for T495* and E560
platform/x86: thinkpad_acpi: Fix NULL pointer dereferences while probing

+34 -15
+4 -4
MAINTAINERS
··· 5544 5544 F: sound/soc/codecs/cros_ec_codec.* 5545 5545 5546 5546 CHROMEOS EC CHARGE CONTROL 5547 - M: Thomas Weißschuh <thomas@weissschuh.net> 5547 + M: Thomas Weißschuh <linux@weissschuh.net> 5548 5548 S: Maintained 5549 5549 F: drivers/power/supply/cros_charge-control.c 5550 5550 5551 5551 CHROMEOS EC HARDWARE MONITORING 5552 - M: Thomas Weißschuh <thomas@weissschuh.net> 5552 + M: Thomas Weißschuh <linux@weissschuh.net> 5553 5553 L: chrome-platform@lists.linux.dev 5554 5554 L: linux-hwmon@vger.kernel.org 5555 5555 S: Maintained ··· 5557 5557 F: drivers/hwmon/cros_ec_hwmon.c 5558 5558 5559 5559 CHROMEOS EC LED DRIVER 5560 - M: Thomas Weißschuh <thomas@weissschuh.net> 5560 + M: Thomas Weißschuh <linux@weissschuh.net> 5561 5561 S: Maintained 5562 5562 F: drivers/leds/leds-cros_ec.c 5563 5563 ··· 10021 10021 F: drivers/hwmon/gigabyte_waterforce.c 10022 10022 10023 10023 GIGABYTE WMI DRIVER 10024 - M: Thomas Weißschuh <thomas@weissschuh.net> 10024 + M: Thomas Weißschuh <linux@weissschuh.net> 10025 10025 L: platform-driver-x86@vger.kernel.org 10026 10026 S: Maintained 10027 10027 F: drivers/platform/x86/gigabyte-wmi.c
+2 -2
drivers/platform/x86/gigabyte-wmi.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 2 /* 3 - * Copyright (C) 2021 Thomas Weißschuh <thomas@weissschuh.net> 3 + * Copyright (C) 2021 Thomas Weißschuh <linux@weissschuh.net> 4 4 */ 5 5 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 6 6 ··· 159 159 module_wmi_driver(gigabyte_wmi_driver); 160 160 161 161 MODULE_DEVICE_TABLE(wmi, gigabyte_wmi_id_table); 162 - MODULE_AUTHOR("Thomas Weißschuh <thomas@weissschuh.net>"); 162 + MODULE_AUTHOR("Thomas Weißschuh <linux@weissschuh.net>"); 163 163 MODULE_DESCRIPTION("Gigabyte WMI temperature driver"); 164 164 MODULE_LICENSE("GPL");
+1 -1
drivers/platform/x86/intel/speed_select_if/isst_if_common.c
··· 84 84 static DEFINE_MUTEX(isst_hash_lock); 85 85 86 86 static int isst_store_new_cmd(int cmd, u32 cpu, int mbox_cmd_type, u32 param, 87 - u32 data) 87 + u64 data) 88 88 { 89 89 struct isst_cmd *sst_cmd; 90 90
+27 -8
drivers/platform/x86/thinkpad_acpi.c
··· 367 367 u32 beep_needs_two_args:1; 368 368 u32 mixer_no_level_control:1; 369 369 u32 battery_force_primary:1; 370 + u32 platform_drv_registered:1; 370 371 u32 hotkey_poll_active:1; 371 372 u32 has_adaptive_kbd:1; 372 373 u32 kbd_lang:1; ··· 8794 8793 #define TPACPI_FAN_NS 0x0010 /* For EC with non-Standard register addresses */ 8795 8794 #define TPACPI_FAN_DECRPM 0x0020 /* For ECFW's with RPM in register as decimal */ 8796 8795 #define TPACPI_FAN_TPR 0x0040 /* Fan speed is in Ticks Per Revolution */ 8796 + #define TPACPI_FAN_NOACPI 0x0080 /* Don't use ACPI methods even if detected */ 8797 8797 8798 8798 static const struct tpacpi_quirk fan_quirk_table[] __initconst = { 8799 8799 TPACPI_QEC_IBM('1', 'Y', TPACPI_FAN_Q1), ··· 8825 8823 TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN), /* X1 Tablet (2nd gen) */ 8826 8824 TPACPI_Q_LNV3('R', '0', 'Q', TPACPI_FAN_DECRPM),/* L480 */ 8827 8825 TPACPI_Q_LNV('8', 'F', TPACPI_FAN_TPR), /* ThinkPad x120e */ 8826 + TPACPI_Q_LNV3('R', '0', '0', TPACPI_FAN_NOACPI),/* E560 */ 8827 + TPACPI_Q_LNV3('R', '1', '2', TPACPI_FAN_NOACPI),/* T495 */ 8828 + TPACPI_Q_LNV3('R', '1', '3', TPACPI_FAN_NOACPI),/* T495s */ 8828 8829 }; 8829 8830 8830 8831 static int __init fan_init(struct ibm_init_struct *iibm) ··· 8877 8872 pr_info("ECFW with fan RPM as decimal in EC register\n"); 8878 8873 ecfw_with_fan_dec_rpm = 1; 8879 8874 tp_features.fan_ctrl_status_undef = 1; 8875 + } 8876 + 8877 + if (quirks & TPACPI_FAN_NOACPI) { 8878 + /* E560, T495, T495s */ 8879 + pr_info("Ignoring buggy ACPI fan access method\n"); 8880 + fang_handle = NULL; 8881 + fanw_handle = NULL; 8880 8882 } 8881 8883 8882 8884 if (gfan_handle) { ··· 11832 11820 platform_device_unregister(tpacpi_sensors_pdev); 11833 11821 } 11834 11822 11835 - if (tpacpi_pdev) { 11823 + if (tp_features.platform_drv_registered) 11836 11824 platform_driver_unregister(&tpacpi_pdriver); 11825 + if (tpacpi_pdev) 11837 11826 platform_device_unregister(tpacpi_pdev); 11838 - } 11839 11827 11840 11828 if (proc_dir) 11841 11829 remove_proc_entry(TPACPI_PROC_DIR, acpi_root_dir); ··· 11905 11893 11906 11894 static int __init tpacpi_hwmon_pdriver_probe(struct platform_device *pdev) 11907 11895 { 11908 - tpacpi_hwmon = devm_hwmon_device_register_with_groups( 11909 - &tpacpi_sensors_pdev->dev, TPACPI_NAME, NULL, tpacpi_hwmon_groups); 11910 - 11896 + tpacpi_hwmon = devm_hwmon_device_register_with_groups(&pdev->dev, TPACPI_NAME, 11897 + NULL, tpacpi_hwmon_groups); 11911 11898 if (IS_ERR(tpacpi_hwmon)) 11912 11899 pr_err("unable to register hwmon device\n"); 11913 11900 ··· 11976 11965 tp_features.quirks = dmi_id->driver_data; 11977 11966 11978 11967 /* Device initialization */ 11979 - tpacpi_pdev = platform_create_bundle(&tpacpi_pdriver, tpacpi_pdriver_probe, 11980 - NULL, 0, NULL, 0); 11968 + tpacpi_pdev = platform_device_register_simple(TPACPI_DRVR_NAME, PLATFORM_DEVID_NONE, 11969 + NULL, 0); 11981 11970 if (IS_ERR(tpacpi_pdev)) { 11982 11971 ret = PTR_ERR(tpacpi_pdev); 11983 11972 tpacpi_pdev = NULL; 11984 - pr_err("unable to register platform device/driver bundle\n"); 11973 + pr_err("unable to register platform device\n"); 11985 11974 thinkpad_acpi_module_exit(); 11986 11975 return ret; 11987 11976 } 11977 + 11978 + ret = platform_driver_probe(&tpacpi_pdriver, tpacpi_pdriver_probe); 11979 + if (ret) { 11980 + pr_err("unable to register main platform driver\n"); 11981 + thinkpad_acpi_module_exit(); 11982 + return ret; 11983 + } 11984 + tp_features.platform_drv_registered = 1; 11988 11985 11989 11986 tpacpi_sensors_pdev = platform_create_bundle(&tpacpi_hwmon_pdriver, 11990 11987 tpacpi_hwmon_pdriver_probe,