Commit f51de61c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'platform-drivers-x86-v6.6-5' of...

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
parents bfd4704c 99c09c98
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -378,8 +378,9 @@ F: drivers/acpi/viot.c
F:	include/linux/acpi_viot.h
ACPI WMI DRIVER
M:	Armin Wolf <W_Armin@gmx.de>
L:	platform-driver-x86@vger.kernel.org
S:	Orphan
S:	Maintained
F:	Documentation/driver-api/wmi.rst
F:	Documentation/wmi/
F:	drivers/platform/x86/wmi.c
+11 −10
Original line number Diff line number Diff line
@@ -609,22 +609,23 @@ static void mlxbf_tmfifo_rxtx_word(struct mlxbf_tmfifo_vring *vring,

	if (vring->cur_len + sizeof(u64) <= len) {
		/* The whole word. */
		if (!IS_VRING_DROP(vring)) {
			if (is_rx)
		if (is_rx) {
			if (!IS_VRING_DROP(vring))
				memcpy(addr + vring->cur_len, &data,
				       sizeof(u64));
			else
		} else {
			memcpy(&data, addr + vring->cur_len,
			       sizeof(u64));
		}
		vring->cur_len += sizeof(u64);
	} else {
		/* Leftover bytes. */
		if (!IS_VRING_DROP(vring)) {
			if (is_rx)
		if (is_rx) {
			if (!IS_VRING_DROP(vring))
				memcpy(addr + vring->cur_len, &data,
				       len - vring->cur_len);
			else
		} else {
			data = 0;
			memcpy(&data, addr + vring->cur_len,
			       len - vring->cur_len);
		}
+1 −2
Original line number Diff line number Diff line
@@ -159,8 +159,7 @@ static int surface_platform_profile_probe(struct ssam_device *sdev)
	set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, tpd->handler.choices);
	set_bit(PLATFORM_PROFILE_PERFORMANCE, tpd->handler.choices);

	platform_profile_register(&tpd->handler);
	return 0;
	return platform_profile_register(&tpd->handler);
}

static void surface_platform_profile_remove(struct ssam_device *sdev)
+13 −1
Original line number Diff line number Diff line
@@ -105,6 +105,8 @@ struct apple_gmux_config {
#define GMUX_BRIGHTNESS_MASK		0x00ffffff
#define GMUX_MAX_BRIGHTNESS		GMUX_BRIGHTNESS_MASK

# define MMIO_GMUX_MAX_BRIGHTNESS	0xffff

static u8 gmux_pio_read8(struct apple_gmux_data *gmux_data, int port)
{
	return inb(gmux_data->iostart + port);
@@ -857,6 +859,16 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)

	memset(&props, 0, sizeof(props));
	props.type = BACKLIGHT_PLATFORM;

	/*
	 * All MMIO gmux's have 0xffff as max brightness, but some iMacs incorrectly
	 * report 0x03ff, despite the firmware being happy to set 0xffff as the brightness
	 * at boot. Force 0xffff for all MMIO gmux's so they all have the correct brightness
	 * range.
	 */
	if (type == APPLE_GMUX_TYPE_MMIO)
		props.max_brightness = MMIO_GMUX_MAX_BRIGHTNESS;
	else
		props.max_brightness = gmux_read32(gmux_data, GMUX_PORT_MAX_BRIGHTNESS);

#if IS_REACHABLE(CONFIG_ACPI_VIDEO)
+3 −0
Original line number Diff line number Diff line
@@ -531,6 +531,9 @@ static void asus_nb_wmi_quirks(struct asus_wmi_driver *driver)
static const struct key_entry asus_nb_wmi_keymap[] = {
	{ KE_KEY, ASUS_WMI_BRN_DOWN, { KEY_BRIGHTNESSDOWN } },
	{ KE_KEY, ASUS_WMI_BRN_UP, { KEY_BRIGHTNESSUP } },
	{ KE_KEY, 0x2a, { KEY_SELECTIVE_SCREENSHOT } },
	{ KE_IGNORE, 0x2b, }, /* PrintScreen (also send via PS/2) on newer models */
	{ KE_IGNORE, 0x2c, }, /* CapsLock (also send via PS/2) on newer models */
	{ KE_KEY, 0x30, { KEY_VOLUMEUP } },
	{ KE_KEY, 0x31, { KEY_VOLUMEDOWN } },
	{ KE_KEY, 0x32, { KEY_MUTE } },
Loading