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

Pull x86 platform driver fixes from Hans de Goede:

- Intel PMC fix for suspend/resume issues on some Sky and Kaby Lake
laptops

- Intel Diamond Rapids hw-id additions

- Documentation and MAINTAINERS fixes

- Some other small fixes

* tag 'platform-drivers-x86-v6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/x86: x86-android-tablets: Fix use after free on platform_device_register() errors
platform/x86: wmi: Update WMI driver API documentation
platform/x86: dell-ddv: Fix typo in documentation
platform/x86: dell-sysman: add support for alienware products
platform/x86/intel: power-domains: Add Diamond Rapids support
platform/x86: ISST: Add Diamond Rapids to support list
platform/x86:intel/pmc: Disable ACPI PM Timer disabling on Sky and Kaby Lake
platform/x86: dell-laptop: Do not fail when encountering unsupported batteries
MAINTAINERS: Update Intel In Field Scan(IFS) entry
platform/x86: ISST: Fix the KASAN report slab-out-of-bounds bug

Changed files
+30 -17
Documentation
driver-api
wmi
drivers
platform
x86
dell
dell-wmi-sysman
intel
x86-android-tablets
+5 -6
Documentation/driver-api/wmi.rst
··· 7 7 The WMI driver core supports a more modern bus-based interface for interacting 8 8 with WMI devices, and an older GUID-based interface. The latter interface is 9 9 considered to be deprecated, so new WMI drivers should generally avoid it since 10 - it has some issues with multiple WMI devices and events sharing the same GUIDs 11 - and/or notification IDs. The modern bus-based interface instead maps each 12 - WMI device to a :c:type:`struct wmi_device <wmi_device>`, so it supports 13 - WMI devices sharing GUIDs and/or notification IDs. Drivers can then register 14 - a :c:type:`struct wmi_driver <wmi_driver>`, which will be bound to compatible 15 - WMI devices by the driver core. 10 + it has some issues with multiple WMI devices sharing the same GUID. 11 + The modern bus-based interface instead maps each WMI device to a 12 + :c:type:`struct wmi_device <wmi_device>`, so it supports WMI devices sharing the 13 + same GUID. Drivers can then register a :c:type:`struct wmi_driver <wmi_driver>` 14 + which will be bound to compatible WMI devices by the driver core. 16 15 17 16 .. kernel-doc:: include/linux/wmi.h 18 17 :internal:
+2 -2
Documentation/wmi/devices/dell-wmi-ddv.rst
··· 8 8 ============ 9 9 10 10 Many Dell notebooks made after ~2020 support a WMI-based interface for 11 - retrieving various system data like battery temperature, ePPID, diagostic data 11 + retrieving various system data like battery temperature, ePPID, diagnostic data 12 12 and fan/thermal sensor data. 13 13 14 14 This interface is likely used by the `Dell Data Vault` software on Windows, ··· 277 277 4. Try to deduce the meaning of a certain WMI method by comparing the control 278 278 flow with other ACPI methods (_BIX or _BIF for battery related methods 279 279 for example). 280 - 5. Use the built-in UEFI diagostics to view sensor types/values for fan/thermal 280 + 5. Use the built-in UEFI diagnostics to view sensor types/values for fan/thermal 281 281 related methods (sometimes overwriting static ACPI data fields can be used 282 282 to test different sensor type values, since on some machines this data is 283 283 not reinitialized upon a warm reset).
+1 -1
MAINTAINERS
··· 11499 11499 11500 11500 INTEL IN FIELD SCAN (IFS) DEVICE 11501 11501 M: Jithu Joseph <jithu.joseph@intel.com> 11502 - R: Ashok Raj <ashok.raj@intel.com> 11502 + R: Ashok Raj <ashok.raj.linux@gmail.com> 11503 11503 R: Tony Luck <tony.luck@intel.com> 11504 11504 S: Maintained 11505 11505 F: drivers/platform/x86/intel/ifs
+12 -3
drivers/platform/x86/dell/dell-laptop.c
··· 2391 2391 }; 2392 2392 ATTRIBUTE_GROUPS(dell_battery); 2393 2393 2394 + static bool dell_battery_supported(struct power_supply *battery) 2395 + { 2396 + /* We currently only support the primary battery */ 2397 + return strcmp(battery->desc->name, "BAT0") == 0; 2398 + } 2399 + 2394 2400 static int dell_battery_add(struct power_supply *battery, 2395 2401 struct acpi_battery_hook *hook) 2396 2402 { 2397 - /* this currently only supports the primary battery */ 2398 - if (strcmp(battery->desc->name, "BAT0") != 0) 2399 - return -ENODEV; 2403 + /* Return 0 instead of an error to avoid being unloaded */ 2404 + if (!dell_battery_supported(battery)) 2405 + return 0; 2400 2406 2401 2407 return device_add_groups(&battery->dev, dell_battery_groups); 2402 2408 } ··· 2410 2404 static int dell_battery_remove(struct power_supply *battery, 2411 2405 struct acpi_battery_hook *hook) 2412 2406 { 2407 + if (!dell_battery_supported(battery)) 2408 + return 0; 2409 + 2413 2410 device_remove_groups(&battery->dev, dell_battery_groups); 2414 2411 return 0; 2415 2412 }
+1
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
··· 521 521 int ret = 0; 522 522 523 523 if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) && 524 + !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL) && 524 525 !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) { 525 526 pr_err("Unable to run on non-Dell system\n"); 526 527 return -ENODEV;
-2
drivers/platform/x86/intel/pmc/spt.c
··· 130 130 .ppfear_buckets = SPT_PPFEAR_NUM_ENTRIES, 131 131 .pm_cfg_offset = SPT_PMC_PM_CFG_OFFSET, 132 132 .pm_read_disable_bit = SPT_PMC_READ_DISABLE_BIT, 133 - .acpi_pm_tmr_ctl_offset = SPT_PMC_ACPI_PM_TMR_CTL_OFFSET, 134 - .acpi_pm_tmr_disable_bit = SPT_PMC_BIT_ACPI_PM_TMR_DISABLE, 135 133 .ltr_ignore_max = SPT_NUM_IP_IGN_ALLOWED, 136 134 .pm_vric1_offset = SPT_PMC_VRIC1_OFFSET, 137 135 };
+4 -1
drivers/platform/x86/intel/speed_select_if/isst_if_common.c
··· 316 316 cpu >= nr_cpu_ids || cpu >= num_possible_cpus()) 317 317 return NULL; 318 318 319 - pkg_id = topology_physical_package_id(cpu); 319 + pkg_id = topology_logical_package_id(cpu); 320 + if (pkg_id >= topology_max_packages()) 321 + return NULL; 320 322 321 323 bus_number = isst_cpu_info[cpu].bus_info[bus_no]; 322 324 if (bus_number < 0) ··· 809 807 X86_MATCH_VFM(INTEL_GRANITERAPIDS_X, SST_HPM_SUPPORTED), 810 808 X86_MATCH_VFM(INTEL_ICELAKE_D, 0), 811 809 X86_MATCH_VFM(INTEL_ICELAKE_X, 0), 810 + X86_MATCH_VFM(INTEL_PANTHERCOVE_X, SST_HPM_SUPPORTED), 812 811 X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, 0), 813 812 X86_MATCH_VFM(INTEL_SKYLAKE_X, SST_MBOX_SUPPORTED), 814 813 {}
+1
drivers/platform/x86/intel/tpmi_power_domains.c
··· 82 82 X86_MATCH_VFM(INTEL_ATOM_CRESTMONT_X, NULL), 83 83 X86_MATCH_VFM(INTEL_ATOM_CRESTMONT, NULL), 84 84 X86_MATCH_VFM(INTEL_GRANITERAPIDS_D, NULL), 85 + X86_MATCH_VFM(INTEL_PANTHERCOVE_X, NULL), 85 86 {} 86 87 }; 87 88 MODULE_DEVICE_TABLE(x86cpu, tpmi_cpu_ids);
+4 -2
drivers/platform/x86/x86-android-tablets/core.c
··· 390 390 for (i = 0; i < pdev_count; i++) { 391 391 pdevs[i] = platform_device_register_full(&dev_info->pdev_info[i]); 392 392 if (IS_ERR(pdevs[i])) { 393 + ret = PTR_ERR(pdevs[i]); 393 394 x86_android_tablet_remove(pdev); 394 - return PTR_ERR(pdevs[i]); 395 + return ret; 395 396 } 396 397 } 397 398 ··· 444 443 PLATFORM_DEVID_AUTO, 445 444 &pdata, sizeof(pdata)); 446 445 if (IS_ERR(pdevs[pdev_count])) { 446 + ret = PTR_ERR(pdevs[pdev_count]); 447 447 x86_android_tablet_remove(pdev); 448 - return PTR_ERR(pdevs[pdev_count]); 448 + return ret; 449 449 } 450 450 pdev_count++; 451 451 }