Commit 5624d4c3 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'platform-drivers-x86-v6.18-3' of...

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

Pull x86 platform driver fixes from Ilpo Järvinen:
 "Fixes and New Hotkey Support:

   - input + dell-wmi-base: Electronic privacy screen on/off hotkey
     support

   - int3472: Fix unregister double free

   - wireless-hotkey: Fix Kconfig typo"

* tag 'platform-drivers-x86-v6.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform: x86: Kconfig: fix minor typo in help for WIRELESS_HOTKEY
  platform/x86: dell-wmi-base: Handle electronic privacy screen on/off events
  Input: Add keycodes for electronic privacy screen on/off hotkeys
  MAINTAINERS: Update int3472 maintainers
  platform/x86: int3472: Fix double free of GPIO device during unregister
parents 1c353dc8 bd34bf51
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -12862,7 +12862,8 @@ F: tools/testing/selftests/sgx/*
K:	\bSGX_
INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER
M:	Daniel Scally <djrscally@gmail.com>
M:	Daniel Scally <dan.scally@ideasonboard.com>
M:	Sakari Ailus <sakari.ailus@linux.intel.com>
S:	Maintained
F:	drivers/platform/x86/intel/int3472/
F:	include/linux/platform_data/x86/int3472.h
+1 −1
Original line number Diff line number Diff line
@@ -432,7 +432,7 @@ config WIRELESS_HOTKEY
	depends on INPUT
	help
	 This driver provides supports for the wireless buttons found on some AMD,
	 HP, & Xioami laptops.
	 HP, & Xiaomi laptops.
	 On such systems the driver should load automatically (via ACPI alias).

	 To compile this driver as a module, choose M here: the module will
+12 −0
Original line number Diff line number Diff line
@@ -365,6 +365,13 @@ static const struct key_entry dell_wmi_keymap_type_0012[] = {
	/* Backlight brightness change event */
	{ KE_IGNORE, 0x0003, { KEY_RESERVED } },

	/*
	 * Electronic privacy screen toggled, extended data gives state,
	 * separate entries for on/off see handling in dell_wmi_process_key().
	 */
	{ KE_KEY, 0x000c, { KEY_EPRIVACY_SCREEN_OFF } },
	{ KE_KEY, 0x000c, { KEY_EPRIVACY_SCREEN_ON } },

	/* Ultra-performance mode switch request */
	{ KE_IGNORE, 0x000d, { KEY_RESERVED } },

@@ -435,6 +442,11 @@ static int dell_wmi_process_key(struct wmi_device *wdev, int type, int code, u16
				      "Dell tablet mode switch",
				      SW_TABLET_MODE, !buffer[0]);
		return 1;
	} else if (type == 0x0012 && code == 0x000c && remaining > 0) {
		/* Eprivacy toggle, switch to "on" key entry for on events */
		if (buffer[0] == 2)
			key++;
		used = 1;
	} else if (type == 0x0012 && code == 0x000d && remaining > 0) {
		value = (buffer[2] == 2);
		used = 1;
+1 −4
Original line number Diff line number Diff line
@@ -245,15 +245,12 @@ int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
	if (IS_ERR(regulator->rdev))
		return PTR_ERR(regulator->rdev);

	int3472->regulators[int3472->n_regulator_gpios].ena_gpio = gpio;
	int3472->n_regulator_gpios++;
	return 0;
}

void skl_int3472_unregister_regulator(struct int3472_discrete_device *int3472)
{
	for (int i = 0; i < int3472->n_regulator_gpios; i++) {
	for (int i = 0; i < int3472->n_regulator_gpios; i++)
		regulator_unregister(int3472->regulators[i].rdev);
		gpiod_put(int3472->regulators[i].ena_gpio);
	}
}
+0 −1
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@ struct int3472_gpio_regulator {
	struct regulator_consumer_supply supply_map[GPIO_REGULATOR_SUPPLY_MAP_COUNT * 2];
	char supply_name_upper[GPIO_SUPPLY_NAME_LENGTH];
	char regulator_name[GPIO_REGULATOR_NAME_LENGTH];
	struct gpio_desc *ena_gpio;
	struct regulator_dev *rdev;
	struct regulator_desc rdesc;
};
Loading