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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull x86 platform driver fixes from Hans de Goede:

- Fix spurious brightness down presses on newer Asus laptop models

- Fix backlight control not working on T2 Mac Pro all-in-ones

- Add Armin Wolf as new maintainer for the WMI bus driver and change
its status from orphaned to maintained

- A few other small fixes

* tag 'platform-drivers-x86-v6.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/mellanox: mlxbf-tmfifo: Fix a warning message
apple-gmux: Hard Code max brightness for MMIO gmux
platform/surface: platform_profile: Propagate error if profile registration fails
platform/x86: asus-wmi: Map 0x2a code, Ignore 0x2b and 0x2c events
platform/x86: asus-wmi: Only map brightness codes when using asus-wmi backlight control
platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to 0x2e
platform/x86: wmi: Update MAINTAINERS entry
platform/x86: msi-ec: Fix the 3rd config
platform/x86: intel-uncore-freq: Conditionally create attribute for read frequency
platform: mellanox: Fix a resource leak in an error handling path in probing flow

+45 -32
+2 -1
MAINTAINERS
··· 378 378 F: include/linux/acpi_viot.h 379 379 380 380 ACPI WMI DRIVER 381 + M: Armin Wolf <W_Armin@gmx.de> 381 382 L: platform-driver-x86@vger.kernel.org 382 - S: Orphan 383 + S: Maintained 383 384 F: Documentation/driver-api/wmi.rst 384 385 F: Documentation/wmi/ 385 386 F: drivers/platform/x86/wmi.c
+11 -10
drivers/platform/mellanox/mlxbf-tmfifo.c
··· 609 609 610 610 if (vring->cur_len + sizeof(u64) <= len) { 611 611 /* The whole word. */ 612 - if (!IS_VRING_DROP(vring)) { 613 - if (is_rx) 612 + if (is_rx) { 613 + if (!IS_VRING_DROP(vring)) 614 614 memcpy(addr + vring->cur_len, &data, 615 615 sizeof(u64)); 616 - else 617 - memcpy(&data, addr + vring->cur_len, 618 - sizeof(u64)); 616 + } else { 617 + memcpy(&data, addr + vring->cur_len, 618 + sizeof(u64)); 619 619 } 620 620 vring->cur_len += sizeof(u64); 621 621 } else { 622 622 /* Leftover bytes. */ 623 - if (!IS_VRING_DROP(vring)) { 624 - if (is_rx) 623 + if (is_rx) { 624 + if (!IS_VRING_DROP(vring)) 625 625 memcpy(addr + vring->cur_len, &data, 626 626 len - vring->cur_len); 627 - else 628 - memcpy(&data, addr + vring->cur_len, 629 - len - vring->cur_len); 627 + } else { 628 + data = 0; 629 + memcpy(&data, addr + vring->cur_len, 630 + len - vring->cur_len); 630 631 } 631 632 vring->cur_len = len; 632 633 }
+1 -2
drivers/platform/surface/surface_platform_profile.c
··· 159 159 set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, tpd->handler.choices); 160 160 set_bit(PLATFORM_PROFILE_PERFORMANCE, tpd->handler.choices); 161 161 162 - platform_profile_register(&tpd->handler); 163 - return 0; 162 + return platform_profile_register(&tpd->handler); 164 163 } 165 164 166 165 static void surface_platform_profile_remove(struct ssam_device *sdev)
+13 -1
drivers/platform/x86/apple-gmux.c
··· 105 105 #define GMUX_BRIGHTNESS_MASK 0x00ffffff 106 106 #define GMUX_MAX_BRIGHTNESS GMUX_BRIGHTNESS_MASK 107 107 108 + # define MMIO_GMUX_MAX_BRIGHTNESS 0xffff 109 + 108 110 static u8 gmux_pio_read8(struct apple_gmux_data *gmux_data, int port) 109 111 { 110 112 return inb(gmux_data->iostart + port); ··· 859 857 860 858 memset(&props, 0, sizeof(props)); 861 859 props.type = BACKLIGHT_PLATFORM; 862 - props.max_brightness = gmux_read32(gmux_data, GMUX_PORT_MAX_BRIGHTNESS); 860 + 861 + /* 862 + * All MMIO gmux's have 0xffff as max brightness, but some iMacs incorrectly 863 + * report 0x03ff, despite the firmware being happy to set 0xffff as the brightness 864 + * at boot. Force 0xffff for all MMIO gmux's so they all have the correct brightness 865 + * range. 866 + */ 867 + if (type == APPLE_GMUX_TYPE_MMIO) 868 + props.max_brightness = MMIO_GMUX_MAX_BRIGHTNESS; 869 + else 870 + props.max_brightness = gmux_read32(gmux_data, GMUX_PORT_MAX_BRIGHTNESS); 863 871 864 872 #if IS_REACHABLE(CONFIG_ACPI_VIDEO) 865 873 register_bdev = acpi_video_get_backlight_type() == acpi_backlight_apple_gmux;
+3
drivers/platform/x86/asus-nb-wmi.c
··· 531 531 static const struct key_entry asus_nb_wmi_keymap[] = { 532 532 { KE_KEY, ASUS_WMI_BRN_DOWN, { KEY_BRIGHTNESSDOWN } }, 533 533 { KE_KEY, ASUS_WMI_BRN_UP, { KEY_BRIGHTNESSUP } }, 534 + { KE_KEY, 0x2a, { KEY_SELECTIVE_SCREENSHOT } }, 535 + { KE_IGNORE, 0x2b, }, /* PrintScreen (also send via PS/2) on newer models */ 536 + { KE_IGNORE, 0x2c, }, /* CapsLock (also send via PS/2) on newer models */ 534 537 { KE_KEY, 0x30, { KEY_VOLUMEUP } }, 535 538 { KE_KEY, 0x31, { KEY_VOLUMEDOWN } }, 536 539 { KE_KEY, 0x32, { KEY_MUTE } },
+4 -11
drivers/platform/x86/asus-wmi.c
··· 3826 3826 { 3827 3827 unsigned int key_value = 1; 3828 3828 bool autorelease = 1; 3829 - int orig_code = code; 3830 3829 3831 3830 if (asus->driver->key_filter) { 3832 3831 asus->driver->key_filter(asus->driver, &code, &key_value, ··· 3834 3835 return; 3835 3836 } 3836 3837 3837 - if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX) 3838 - code = ASUS_WMI_BRN_UP; 3839 - else if (code >= NOTIFY_BRNDOWN_MIN && code <= NOTIFY_BRNDOWN_MAX) 3840 - code = ASUS_WMI_BRN_DOWN; 3841 - 3842 - if (code == ASUS_WMI_BRN_DOWN || code == ASUS_WMI_BRN_UP) { 3843 - if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { 3844 - asus_wmi_backlight_notify(asus, orig_code); 3845 - return; 3846 - } 3838 + if (acpi_video_get_backlight_type() == acpi_backlight_vendor && 3839 + code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNDOWN_MAX) { 3840 + asus_wmi_backlight_notify(asus, code); 3841 + return; 3847 3842 } 3848 3843 3849 3844 if (code == NOTIFY_KBD_BRTUP) {
+1 -1
drivers/platform/x86/asus-wmi.h
··· 18 18 #include <linux/i8042.h> 19 19 20 20 #define ASUS_WMI_KEY_IGNORE (-1) 21 - #define ASUS_WMI_BRN_DOWN 0x20 21 + #define ASUS_WMI_BRN_DOWN 0x2e 22 22 #define ASUS_WMI_BRN_UP 0x2f 23 23 24 24 struct module;
+6 -2
drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c
··· 176 176 177 177 static int create_attr_group(struct uncore_data *data, char *name) 178 178 { 179 - int ret, index = 0; 179 + int ret, freq, index = 0; 180 180 181 181 init_attribute_rw(max_freq_khz); 182 182 init_attribute_rw(min_freq_khz); ··· 197 197 data->uncore_attrs[index++] = &data->min_freq_khz_dev_attr.attr; 198 198 data->uncore_attrs[index++] = &data->initial_min_freq_khz_dev_attr.attr; 199 199 data->uncore_attrs[index++] = &data->initial_max_freq_khz_dev_attr.attr; 200 - data->uncore_attrs[index++] = &data->current_freq_khz_dev_attr.attr; 200 + 201 + ret = uncore_read_freq(data, &freq); 202 + if (!ret) 203 + data->uncore_attrs[index++] = &data->current_freq_khz_dev_attr.attr; 204 + 201 205 data->uncore_attrs[index] = NULL; 202 206 203 207 data->uncore_attr_group.name = name;
+3 -2
drivers/platform/x86/mlx-platform.c
··· 6514 6514 return 0; 6515 6515 6516 6516 fail_mlxplat_i2c_mux_topology_init: 6517 + platform_device_unregister(priv->pdev_i2c); 6517 6518 fail_platform_i2c_register: 6518 6519 fail_mlxplat_mlxcpld_verify_bus_topology: 6519 6520 return err; ··· 6522 6521 6523 6522 static void mlxplat_i2c_main_exit(struct mlxplat_priv *priv) 6524 6523 { 6524 + mlxplat_pre_exit(priv); 6525 6525 mlxplat_i2c_mux_topology_exit(priv); 6526 6526 if (priv->pdev_i2c) 6527 6527 platform_device_unregister(priv->pdev_i2c); ··· 6599 6597 6600 6598 fail_register_reboot_notifier: 6601 6599 fail_regcache_sync: 6602 - mlxplat_pre_exit(priv); 6600 + mlxplat_i2c_main_exit(priv); 6603 6601 fail_mlxplat_i2c_main_init: 6604 6602 fail_regmap_write: 6605 6603 fail_alloc: ··· 6616 6614 pm_power_off = NULL; 6617 6615 if (mlxplat_reboot_nb) 6618 6616 unregister_reboot_notifier(mlxplat_reboot_nb); 6619 - mlxplat_pre_exit(priv); 6620 6617 mlxplat_i2c_main_exit(priv); 6621 6618 mlxplat_post_exit(); 6622 6619 return 0;
+1 -2
drivers/platform/x86/msi-ec.c
··· 276 276 277 277 static const char * const ALLOWED_FW_3[] __initconst = { 278 278 "1592EMS1.111", 279 - "E1592IMS.10C", 280 279 NULL 281 280 }; 282 281 283 282 static struct msi_ec_conf CONF3 __initdata = { 284 283 .allowed_fw = ALLOWED_FW_3, 285 284 .charge_control = { 286 - .address = 0xef, 285 + .address = 0xd7, 287 286 .offset_start = 0x8a, 288 287 .offset_end = 0x80, 289 288 .range_min = 0x8a,