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

Merge tag 'platform-drivers-x86-v5.9-2' of git://git.infradead.org/linux-platform-drivers-x86

Pull x86 platform driver fixes from Andy Shevchenko:
"We have some fixes for Tablet Mode reporting in particular, that users
are complaining a lot about.

Summary:

- Attempt #3 of enabling Tablet Mode reporting w/o regressions

- Improve battery recognition code in ASUS WMI driver

- Fix Kconfig dependency warning for Fujitsu and LG laptop drivers

- Add fixes in Thinkpad ACPI driver for _BCL method and NVRAM polling

- Fix power supply extended topology in Mellanox driver

- Fix memory leak in OLPC EC driver

- Avoid static struct device in Intel PMC core driver

- Add support for the touchscreen found in MPMAN Converter9 2-in-1

- Update MAINTAINERS to reflect the real state of affairs"

* tag 'platform-drivers-x86-v5.9-2' of git://git.infradead.org/linux-platform-drivers-x86:
platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse
MAINTAINERS: Add Mark Gross and Hans de Goede as x86 platform drivers maintainers
platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting
platform/x86: intel-vbtn: Revert "Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360"
platform/x86: intel_pmc_core: do not create a static struct device
platform/x86: mlx-platform: Fix extended topology configuration for power supply units
platform/x86: pcengines-apuv2: Fix typo on define of AMD_FCH_GPIO_REG_GPIO55_DEVSLP0
platform/x86: fix kconfig dependency warning for FUJITSU_LAPTOP
platform/x86: fix kconfig dependency warning for LG_LAPTOP
platform/x86: thinkpad_acpi: initialize tp_nvram_state variable
platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360
platform/x86: asus-wmi: Add BATC battery name to the list of supported
platform/x86: asus-nb-wmi: Revert "Do not load on Asus T100TA and T200TA"
platform/x86: touchscreen_dmi: Add info for the MPMAN Converter9 2-in-1
Documentation: laptops: thinkpad-acpi: fix underline length build warning
Platform: OLPC: Fix memleak in olpc_ec_probe

+113 -55
+3 -3
MAINTAINERS
··· 18890 18890 F: arch/x86/mm/ 18891 18891 18892 18892 X86 PLATFORM DRIVERS 18893 - M: Darren Hart <dvhart@infradead.org> 18894 - M: Andy Shevchenko <andy@infradead.org> 18893 + M: Hans de Goede <hdegoede@redhat.com> 18894 + M: Mark Gross <mgross@linux.intel.com> 18895 18895 L: platform-driver-x86@vger.kernel.org 18896 - S: Odd Fixes 18896 + S: Maintained 18897 18897 T: git git://git.infradead.org/linux-platform-drivers-x86.git 18898 18898 F: drivers/platform/olpc/ 18899 18899 F: drivers/platform/x86/
+3 -1
drivers/platform/olpc/olpc-ec.c
··· 439 439 &config); 440 440 if (IS_ERR(ec->dcon_rdev)) { 441 441 dev_err(&pdev->dev, "failed to register DCON regulator\n"); 442 - return PTR_ERR(ec->dcon_rdev); 442 + err = PTR_ERR(ec->dcon_rdev); 443 + kfree(ec); 444 + return err; 443 445 } 444 446 445 447 ec->dbgfs_dir = olpc_ec_setup_debugfs();
+2
drivers/platform/x86/Kconfig
··· 469 469 depends on BACKLIGHT_CLASS_DEVICE 470 470 depends on ACPI_VIDEO || ACPI_VIDEO = n 471 471 select INPUT_SPARSEKMAP 472 + select NEW_LEDS 472 473 select LEDS_CLASS 473 474 help 474 475 This is a driver for laptops built by Fujitsu: ··· 1113 1112 depends on ACPI_WMI 1114 1113 depends on INPUT 1115 1114 select INPUT_SPARSEKMAP 1115 + select NEW_LEDS 1116 1116 select LEDS_CLASS 1117 1117 help 1118 1118 This driver adds support for hotkeys as well as control of keyboard
-24
drivers/platform/x86/asus-nb-wmi.c
··· 593 593 .detect_quirks = asus_nb_wmi_quirks, 594 594 }; 595 595 596 - static const struct dmi_system_id asus_nb_wmi_blacklist[] __initconst = { 597 - { 598 - /* 599 - * asus-nb-wm adds no functionality. The T100TA has a detachable 600 - * USB kbd, so no hotkeys and it has no WMI rfkill; and loading 601 - * asus-nb-wm causes the camera LED to turn and _stay_ on. 602 - */ 603 - .matches = { 604 - DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 605 - DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TA"), 606 - }, 607 - }, 608 - { 609 - /* The Asus T200TA has the same issue as the T100TA */ 610 - .matches = { 611 - DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 612 - DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T200TA"), 613 - }, 614 - }, 615 - {} /* Terminating entry */ 616 - }; 617 596 618 597 static int __init asus_nb_wmi_init(void) 619 598 { 620 - if (dmi_check_system(asus_nb_wmi_blacklist)) 621 - return -ENODEV; 622 - 623 599 return asus_wmi_register_driver(&asus_nb_wmi_driver); 624 600 } 625 601
+1
drivers/platform/x86/asus-wmi.c
··· 442 442 */ 443 443 if (strcmp(battery->desc->name, "BAT0") != 0 && 444 444 strcmp(battery->desc->name, "BAT1") != 0 && 445 + strcmp(battery->desc->name, "BATC") != 0 && 445 446 strcmp(battery->desc->name, "BATT") != 0) 446 447 return -ENODEV; 447 448
+43 -9
drivers/platform/x86/intel-vbtn.c
··· 167 167 return ACPI_SUCCESS(status); 168 168 } 169 169 170 + /* 171 + * There are several laptops (non 2-in-1) models out there which support VGBS, 172 + * but simply always return 0, which we translate to SW_TABLET_MODE=1. This in 173 + * turn causes userspace (libinput) to suppress events from the builtin 174 + * keyboard and touchpad, making the laptop essentially unusable. 175 + * 176 + * Since the problem of wrongly reporting SW_TABLET_MODE=1 in combination 177 + * with libinput, leads to a non-usable system. Where as OTOH many people will 178 + * not even notice when SW_TABLET_MODE is not being reported, a DMI based allow 179 + * list is used here. This list mainly matches on the chassis-type of 2-in-1s. 180 + * 181 + * There are also some 2-in-1s which use the intel-vbtn ACPI interface to report 182 + * SW_TABLET_MODE with a chassis-type of 8 ("Portable") or 10 ("Notebook"), 183 + * these are matched on a per model basis, since many normal laptops with a 184 + * possible broken VGBS ACPI-method also use these chassis-types. 185 + */ 186 + static const struct dmi_system_id dmi_switches_allow_list[] = { 187 + { 188 + .matches = { 189 + DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "31" /* Convertible */), 190 + }, 191 + }, 192 + { 193 + .matches = { 194 + DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "32" /* Detachable */), 195 + }, 196 + }, 197 + { 198 + .matches = { 199 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 200 + DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7130"), 201 + }, 202 + }, 203 + { 204 + .matches = { 205 + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 206 + DMI_MATCH(DMI_PRODUCT_NAME, "HP Stream x360 Convertible PC 11"), 207 + }, 208 + }, 209 + {} /* Array terminator */ 210 + }; 211 + 170 212 static bool intel_vbtn_has_switches(acpi_handle handle) 171 213 { 172 - const char *chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE); 173 214 unsigned long long vgbs; 174 215 acpi_status status; 175 216 176 - /* 177 - * Some normal laptops have a VGBS method despite being non-convertible 178 - * and their VGBS method always returns 0, causing detect_tablet_mode() 179 - * to report SW_TABLET_MODE=1 to userspace, which causes issues. 180 - * These laptops have a DMI chassis_type of 9 ("Laptop"), do not report 181 - * switches on any devices with a DMI chassis_type of 9. 182 - */ 183 - if (chassis_type && strcmp(chassis_type, "9") == 0) 217 + if (!dmi_check_system(dmi_switches_allow_list)) 184 218 return false; 185 219 186 220 status = acpi_evaluate_integer(handle, "VGBS", NULL, &vgbs);
+17 -9
drivers/platform/x86/intel_pmc_core_pltdrv.c
··· 20 20 21 21 static void intel_pmc_core_release(struct device *dev) 22 22 { 23 - /* Nothing to do. */ 23 + kfree(dev); 24 24 } 25 25 26 - static struct platform_device pmc_core_device = { 27 - .name = "intel_pmc_core", 28 - .dev = { 29 - .release = intel_pmc_core_release, 30 - }, 31 - }; 26 + static struct platform_device *pmc_core_device; 32 27 33 28 /* 34 29 * intel_pmc_core_platform_ids is the list of platforms where we want to ··· 47 52 48 53 static int __init pmc_core_platform_init(void) 49 54 { 55 + int retval; 56 + 50 57 /* Skip creating the platform device if ACPI already has a device */ 51 58 if (acpi_dev_present("INT33A1", NULL, -1)) 52 59 return -ENODEV; ··· 56 59 if (!x86_match_cpu(intel_pmc_core_platform_ids)) 57 60 return -ENODEV; 58 61 59 - return platform_device_register(&pmc_core_device); 62 + pmc_core_device = kzalloc(sizeof(*pmc_core_device), GFP_KERNEL); 63 + if (!pmc_core_device) 64 + return -ENOMEM; 65 + 66 + pmc_core_device->name = "intel_pmc_core"; 67 + pmc_core_device->dev.release = intel_pmc_core_release; 68 + 69 + retval = platform_device_register(pmc_core_device); 70 + if (retval) 71 + kfree(pmc_core_device); 72 + 73 + return retval; 60 74 } 61 75 62 76 static void __exit pmc_core_platform_exit(void) 63 77 { 64 - platform_device_unregister(&pmc_core_device); 78 + platform_device_unregister(pmc_core_device); 65 79 } 66 80 67 81 module_init(pmc_core_platform_init);
+13 -5
drivers/platform/x86/mlx-platform.c
··· 171 171 #define MLXPLAT_CPLD_NR_NONE -1 172 172 #define MLXPLAT_CPLD_PSU_DEFAULT_NR 10 173 173 #define MLXPLAT_CPLD_PSU_MSNXXXX_NR 4 174 - #define MLXPLAT_CPLD_PSU_MSNXXXX_NR2 3 175 174 #define MLXPLAT_CPLD_FAN1_DEFAULT_NR 11 176 175 #define MLXPLAT_CPLD_FAN2_DEFAULT_NR 12 177 176 #define MLXPLAT_CPLD_FAN3_DEFAULT_NR 13 ··· 343 344 }, 344 345 { 345 346 I2C_BOARD_INFO("dps460", 0x58), 347 + }, 348 + }; 349 + 350 + static struct i2c_board_info mlxplat_mlxcpld_ext_pwr[] = { 351 + { 352 + I2C_BOARD_INFO("dps460", 0x5b), 353 + }, 354 + { 355 + I2C_BOARD_INFO("dps460", 0x5a), 346 356 }, 347 357 }; 348 358 ··· 929 921 .label = "pwr3", 930 922 .reg = MLXPLAT_CPLD_LPC_REG_PWR_OFFSET, 931 923 .mask = BIT(2), 932 - .hpdev.brdinfo = &mlxplat_mlxcpld_pwr[0], 933 - .hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR2, 924 + .hpdev.brdinfo = &mlxplat_mlxcpld_ext_pwr[0], 925 + .hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR, 934 926 }, 935 927 { 936 928 .label = "pwr4", 937 929 .reg = MLXPLAT_CPLD_LPC_REG_PWR_OFFSET, 938 930 .mask = BIT(3), 939 - .hpdev.brdinfo = &mlxplat_mlxcpld_pwr[1], 940 - .hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR2, 931 + .hpdev.brdinfo = &mlxplat_mlxcpld_ext_pwr[1], 932 + .hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR, 941 933 }, 942 934 }; 943 935
+1 -1
drivers/platform/x86/pcengines-apuv2.c
··· 32 32 #define APU2_GPIO_REG_LED3 AMD_FCH_GPIO_REG_GPIO59_DEVSLP1 33 33 #define APU2_GPIO_REG_MODESW AMD_FCH_GPIO_REG_GPIO32_GE1 34 34 #define APU2_GPIO_REG_SIMSWAP AMD_FCH_GPIO_REG_GPIO33_GE2 35 - #define APU2_GPIO_REG_MPCIE2 AMD_FCH_GPIO_REG_GPIO59_DEVSLP0 35 + #define APU2_GPIO_REG_MPCIE2 AMD_FCH_GPIO_REG_GPIO55_DEVSLP0 36 36 #define APU2_GPIO_REG_MPCIE3 AMD_FCH_GPIO_REG_GPIO51 37 37 38 38 /* Order in which the GPIO lines are defined in the register list */
+4 -2
drivers/platform/x86/thinkpad_acpi.c
··· 2569 2569 */ 2570 2570 static int hotkey_kthread(void *data) 2571 2571 { 2572 - struct tp_nvram_state s[2]; 2572 + struct tp_nvram_state s[2] = { 0 }; 2573 2573 u32 poll_mask, event_mask; 2574 2574 unsigned int si, so; 2575 2575 unsigned long t; ··· 6829 6829 list_for_each_entry(child, &device->children, node) { 6830 6830 acpi_status status = acpi_evaluate_object(child->handle, "_BCL", 6831 6831 NULL, &buffer); 6832 - if (ACPI_FAILURE(status)) 6832 + if (ACPI_FAILURE(status)) { 6833 + buffer.length = ACPI_ALLOCATE_BUFFER; 6833 6834 continue; 6835 + } 6834 6836 6835 6837 obj = (union acpi_object *)buffer.pointer; 6836 6838 if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) {
+25
drivers/platform/x86/touchscreen_dmi.c
··· 373 373 .properties = jumper_ezpad_mini3_props, 374 374 }; 375 375 376 + static const struct property_entry mpman_converter9_props[] = { 377 + PROPERTY_ENTRY_U32("touchscreen-min-x", 8), 378 + PROPERTY_ENTRY_U32("touchscreen-min-y", 8), 379 + PROPERTY_ENTRY_U32("touchscreen-size-x", 1664), 380 + PROPERTY_ENTRY_U32("touchscreen-size-y", 880), 381 + PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), 382 + PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), 383 + PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-mpman-converter9.fw"), 384 + PROPERTY_ENTRY_U32("silead,max-fingers", 10), 385 + { } 386 + }; 387 + 388 + static const struct ts_dmi_data mpman_converter9_data = { 389 + .acpi_name = "MSSL1680:00", 390 + .properties = mpman_converter9_props, 391 + }; 392 + 376 393 static const struct property_entry mpman_mpwin895cl_props[] = { 377 394 PROPERTY_ENTRY_U32("touchscreen-min-x", 3), 378 395 PROPERTY_ENTRY_U32("touchscreen-min-y", 9), ··· 991 974 .matches = { 992 975 DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"), 993 976 DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"), 977 + }, 978 + }, 979 + { 980 + /* MP Man Converter 9 */ 981 + .driver_data = (void *)&mpman_converter9_data, 982 + .matches = { 983 + DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"), 984 + DMI_MATCH(DMI_PRODUCT_NAME, "Converter9"), 994 985 }, 995 986 }, 996 987 {
+1 -1
include/linux/platform_data/gpio/gpio-amd-fch.h
··· 19 19 #define AMD_FCH_GPIO_REG_GPIO49 0x40 20 20 #define AMD_FCH_GPIO_REG_GPIO50 0x41 21 21 #define AMD_FCH_GPIO_REG_GPIO51 0x42 22 - #define AMD_FCH_GPIO_REG_GPIO59_DEVSLP0 0x43 22 + #define AMD_FCH_GPIO_REG_GPIO55_DEVSLP0 0x43 23 23 #define AMD_FCH_GPIO_REG_GPIO57 0x44 24 24 #define AMD_FCH_GPIO_REG_GPIO58 0x45 25 25 #define AMD_FCH_GPIO_REG_GPIO59_DEVSLP1 0x46