mirror of
https://github.com/torvalds/linux.git
synced 2025-12-01 07:26:02 +07:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -631,6 +631,18 @@
|
||||
#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
|
||||
#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
|
||||
|
||||
/*
|
||||
* Keycodes for hotkeys toggling the electronic privacy screen found on some
|
||||
* laptops on/off. Note when the embedded-controller turns on/off the eprivacy
|
||||
* screen itself then the state should be reported through drm connecter props:
|
||||
* https://www.kernel.org/doc/html/latest/gpu/drm-kms.html#standard-connector-properties
|
||||
* Except when implementing the drm connecter properties API is not possible
|
||||
* because e.g. the firmware does not allow querying the presence and/or status
|
||||
* of the eprivacy screen at boot.
|
||||
*/
|
||||
#define KEY_EPRIVACY_SCREEN_ON 0x252
|
||||
#define KEY_EPRIVACY_SCREEN_OFF 0x253
|
||||
|
||||
#define KEY_KBDINPUTASSIST_PREV 0x260
|
||||
#define KEY_KBDINPUTASSIST_NEXT 0x261
|
||||
#define KEY_KBDINPUTASSIST_PREVGROUP 0x262
|
||||
|
||||
Reference in New Issue
Block a user