Skip to content

Commit 7ebd68d

Browse files
committed
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
2 parents fffb5cd + 566d3a5 commit 7ebd68d

File tree

4 files changed

+34
-15
lines changed

4 files changed

+34
-15
lines changed

MAINTAINERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5544,20 +5544,20 @@ F: Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
55445544
F: sound/soc/codecs/cros_ec_codec.*
55455545

55465546
CHROMEOS EC CHARGE CONTROL
5547-
M: Thomas Weißschuh <thomas@weissschuh.net>
5547+
M: Thomas Weißschuh <linux@weissschuh.net>
55485548
S: Maintained
55495549
F: drivers/power/supply/cros_charge-control.c
55505550

55515551
CHROMEOS EC HARDWARE MONITORING
5552-
M: Thomas Weißschuh <thomas@weissschuh.net>
5552+
M: Thomas Weißschuh <linux@weissschuh.net>
55535553
L: chrome-platform@lists.linux.dev
55545554
L: linux-hwmon@vger.kernel.org
55555555
S: Maintained
55565556
F: Documentation/hwmon/cros_ec_hwmon.rst
55575557
F: drivers/hwmon/cros_ec_hwmon.c
55585558

55595559
CHROMEOS EC LED DRIVER
5560-
M: Thomas Weißschuh <thomas@weissschuh.net>
5560+
M: Thomas Weißschuh <linux@weissschuh.net>
55615561
S: Maintained
55625562
F: drivers/leds/leds-cros_ec.c
55635563

@@ -10021,7 +10021,7 @@ F: Documentation/hwmon/gigabyte_waterforce.rst
1002110021
F: drivers/hwmon/gigabyte_waterforce.c
1002210022

1002310023
GIGABYTE WMI DRIVER
10024-
M: Thomas Weißschuh <thomas@weissschuh.net>
10024+
M: Thomas Weißschuh <linux@weissschuh.net>
1002510025
L: platform-driver-x86@vger.kernel.org
1002610026
S: Maintained
1002710027
F: drivers/platform/x86/gigabyte-wmi.c

drivers/platform/x86/gigabyte-wmi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
22
/*
3-
* Copyright (C) 2021 Thomas Weißschuh <thomas@weissschuh.net>
3+
* Copyright (C) 2021 Thomas Weißschuh <linux@weissschuh.net>
44
*/
55
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
66

@@ -159,6 +159,6 @@ static struct wmi_driver gigabyte_wmi_driver = {
159159
module_wmi_driver(gigabyte_wmi_driver);
160160

161161
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>");
163163
MODULE_DESCRIPTION("Gigabyte WMI temperature driver");
164164
MODULE_LICENSE("GPL");

drivers/platform/x86/intel/speed_select_if/isst_if_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static DECLARE_HASHTABLE(isst_hash, 8);
8484
static DEFINE_MUTEX(isst_hash_lock);
8585

8686
static int isst_store_new_cmd(int cmd, u32 cpu, int mbox_cmd_type, u32 param,
87-
u32 data)
87+
u64 data)
8888
{
8989
struct isst_cmd *sst_cmd;
9090

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ static struct {
367367
u32 beep_needs_two_args:1;
368368
u32 mixer_no_level_control:1;
369369
u32 battery_force_primary:1;
370+
u32 platform_drv_registered:1;
370371
u32 hotkey_poll_active:1;
371372
u32 has_adaptive_kbd:1;
372373
u32 kbd_lang:1;
@@ -8793,6 +8794,7 @@ static const struct attribute_group fan_driver_attr_group = {
87938794
#define TPACPI_FAN_NS 0x0010 /* For EC with non-Standard register addresses */
87948795
#define TPACPI_FAN_DECRPM 0x0020 /* For ECFW's with RPM in register as decimal */
87958796
#define TPACPI_FAN_TPR 0x0040 /* Fan speed is in Ticks Per Revolution */
8797+
#define TPACPI_FAN_NOACPI 0x0080 /* Don't use ACPI methods even if detected */
87968798

87978799
static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
87988800
TPACPI_QEC_IBM('1', 'Y', TPACPI_FAN_Q1),
@@ -8823,6 +8825,9 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
88238825
TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN), /* X1 Tablet (2nd gen) */
88248826
TPACPI_Q_LNV3('R', '0', 'Q', TPACPI_FAN_DECRPM),/* L480 */
88258827
TPACPI_Q_LNV('8', 'F', TPACPI_FAN_TPR), /* ThinkPad x120e */
8828+
TPACPI_Q_LNV3('R', '0', '0', TPACPI_FAN_NOACPI),/* E560 */
8829+
TPACPI_Q_LNV3('R', '1', '2', TPACPI_FAN_NOACPI),/* T495 */
8830+
TPACPI_Q_LNV3('R', '1', '3', TPACPI_FAN_NOACPI),/* T495s */
88268831
};
88278832

88288833
static int __init fan_init(struct ibm_init_struct *iibm)
@@ -8874,6 +8879,13 @@ static int __init fan_init(struct ibm_init_struct *iibm)
88748879
tp_features.fan_ctrl_status_undef = 1;
88758880
}
88768881

8882+
if (quirks & TPACPI_FAN_NOACPI) {
8883+
/* E560, T495, T495s */
8884+
pr_info("Ignoring buggy ACPI fan access method\n");
8885+
fang_handle = NULL;
8886+
fanw_handle = NULL;
8887+
}
8888+
88778889
if (gfan_handle) {
88788890
/* 570, 600e/x, 770e, 770x */
88798891
fan_status_access_mode = TPACPI_FAN_RD_ACPI_GFAN;
@@ -11820,10 +11832,10 @@ static void thinkpad_acpi_module_exit(void)
1182011832
platform_device_unregister(tpacpi_sensors_pdev);
1182111833
}
1182211834

11823-
if (tpacpi_pdev) {
11835+
if (tp_features.platform_drv_registered)
1182411836
platform_driver_unregister(&tpacpi_pdriver);
11837+
if (tpacpi_pdev)
1182511838
platform_device_unregister(tpacpi_pdev);
11826-
}
1182711839

1182811840
if (proc_dir)
1182911841
remove_proc_entry(TPACPI_PROC_DIR, acpi_root_dir);
@@ -11893,9 +11905,8 @@ static int __init tpacpi_pdriver_probe(struct platform_device *pdev)
1189311905

1189411906
static int __init tpacpi_hwmon_pdriver_probe(struct platform_device *pdev)
1189511907
{
11896-
tpacpi_hwmon = devm_hwmon_device_register_with_groups(
11897-
&tpacpi_sensors_pdev->dev, TPACPI_NAME, NULL, tpacpi_hwmon_groups);
11898-
11908+
tpacpi_hwmon = devm_hwmon_device_register_with_groups(&pdev->dev, TPACPI_NAME,
11909+
NULL, tpacpi_hwmon_groups);
1189911910
if (IS_ERR(tpacpi_hwmon))
1190011911
pr_err("unable to register hwmon device\n");
1190111912

@@ -11965,15 +11976,23 @@ static int __init thinkpad_acpi_module_init(void)
1196511976
tp_features.quirks = dmi_id->driver_data;
1196611977

1196711978
/* Device initialization */
11968-
tpacpi_pdev = platform_create_bundle(&tpacpi_pdriver, tpacpi_pdriver_probe,
11969-
NULL, 0, NULL, 0);
11979+
tpacpi_pdev = platform_device_register_simple(TPACPI_DRVR_NAME, PLATFORM_DEVID_NONE,
11980+
NULL, 0);
1197011981
if (IS_ERR(tpacpi_pdev)) {
1197111982
ret = PTR_ERR(tpacpi_pdev);
1197211983
tpacpi_pdev = NULL;
11973-
pr_err("unable to register platform device/driver bundle\n");
11984+
pr_err("unable to register platform device\n");
11985+
thinkpad_acpi_module_exit();
11986+
return ret;
11987+
}
11988+
11989+
ret = platform_driver_probe(&tpacpi_pdriver, tpacpi_pdriver_probe);
11990+
if (ret) {
11991+
pr_err("unable to register main platform driver\n");
1197411992
thinkpad_acpi_module_exit();
1197511993
return ret;
1197611994
}
11995+
tp_features.platform_drv_registered = 1;
1197711996

1197811997
tpacpi_sensors_pdev = platform_create_bundle(&tpacpi_hwmon_pdriver,
1197911998
tpacpi_hwmon_pdriver_probe,

0 commit comments

Comments
 (0)