diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-19 10:00:31 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-19 10:00:31 -0700 |
| commit | a93f3bf4e1d60777b1659b812c9e818cfc53b449 (patch) | |
| tree | b72ace6a8daab0659264d38399cc618f01c0ec2b /drivers/input | |
| parent | 7acf90feab8b009fde7def08ff2c622d0f10e99f (diff) | |
| parent | d89f04ac41e3b83a25b02c8d818ce09d7afc74c9 (diff) | |
Merge tag 'hid-for-linus-2026081901' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID updates from Jiri Kosina:
"Core:
- fix long-standing force-feedback initialization race across the
subsystem (Dmitry Torokhov)
- switch to system_dfl_wq (Marco Crivellari)
AMD-SFH:
- support for tablet-mode switch for AMD SFH-based systems (Basavaraj
Natikar)
HyperX:
- support for HyperX QuadCast 2 (Benjamin Blume)
I2C-HID:
- support for devices that provide HID descriptor solely through
the ACPI _DSM method (XIE Zhibang)
Intel-THC-HID:
- support for full I2C bus config parameters (Even Xu)
Logitech:
- HID++ 2.0 repogrammable button support (Elliot Douglas)
- Bolt receiver support for HID++ devices (Erik HÃ¥kansson)
MSI:
- support for MSI Claw (Derek J. Clark)
Steam:
- initial support for 2026 Steam Controller (Vicki Pfau)
- support for sensor events on the 2025 Steam Controller (Vicki Pfau)
And many, many other fixes for various long standing issues that were
found by new modern tools, and quite a few device ID additions"
* tag 'hid-for-linus-2026081901' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (146 commits)
HID: tmff: Use 64-bit arithmetic for force feedback scaling
HID: multitouch: reclassify HTIX5288 to WIN_8_FORCE_MULTI_INPUT_NSMU
HID: sensor: custom: Fix field sysfs group cleanup on failure
HID: sensor: custom: Fix use-after-free in enable_sensor
HID: intel-thc-hid: intel-quickspi: bound GET_REPORT response to the caller buffer
HID: haptic: don't write an uninitialized value to unhandled usages
HID: intel-thc-hid: intel-quickspi: fix autosuspend cleanup during teardown
HID: intel-thc-hid: intel-quicki2c: fix autosuspend cleanup during teardown
HID: steam: Zero out inputs when disabling gamepad mode
HID: steam: Clean up locking
HID: steam: Don't set feature reports when disconnecting
HID: steam: Fix wording of connect/disconnect logs
HID: steam: Initial 2026 Steam Controller support
HID: steam: Refactor registration
HID: logitech: add Bolt receiver support for Logitech HID++ devices
HID: sensor-hub: Fix out-of-bounds write in sensor_hub_get_feature
HID: universal-pidff: stop the device when force-feedback init fails
HID: haptic: move FF initialization into .input_configured()
HID: logitech-hidpp: move FF initialization to .input_configured()
HID: megaworld: move FF initialization to .input_configured()
...
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/misc/Kconfig | 15 | ||||
| -rw-r--r-- | drivers/input/misc/Makefile | 1 | ||||
| -rw-r--r-- | drivers/input/misc/amd_sfh_tabletmode.c | 81 |
3 files changed, 97 insertions, 0 deletions
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index abee43158d84..169768e3d5bb 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -914,6 +914,21 @@ config INPUT_SOC_BUTTON_ARRAY To compile this driver as a module, choose M here: the module will be called soc_button_array. +config INPUT_AMD_SFH_TABLETMODE + tristate "AMD SFH tablet-mode switch" + depends on AMD_SFH_HID + select AUXILIARY_BUS + help + Expose SW_TABLET_MODE for AMD convertible laptops whose + operation-mode sensor is provided by the AMD Sensor Fusion Hub. + + Userspace components such as systemd-logind and modern desktop + environments react to SW_TABLET_MODE when the device is folded + into tablet posture. + + To compile this driver as a module, choose M here: the module + will be called amd_sfh_tabletmode. + config INPUT_DRV260X_HAPTICS tristate "TI DRV260X haptics support" depends on INPUT && I2C diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index e9f85ca20c33..1339619f0769 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_INPUT_AD714X_SPI) += ad714x-spi.o obj-$(CONFIG_INPUT_ADXL34X) += adxl34x.o obj-$(CONFIG_INPUT_ADXL34X_I2C) += adxl34x-i2c.o obj-$(CONFIG_INPUT_ADXL34X_SPI) += adxl34x-spi.o +obj-$(CONFIG_INPUT_AMD_SFH_TABLETMODE) += amd_sfh_tabletmode.o obj-$(CONFIG_INPUT_APANEL) += apanel.o obj-$(CONFIG_INPUT_ARIEL_PWRBUTTON) += ariel-pwrbutton.o obj-$(CONFIG_INPUT_ARIZONA_HAPTICS) += arizona-haptics.o diff --git a/drivers/input/misc/amd_sfh_tabletmode.c b/drivers/input/misc/amd_sfh_tabletmode.c new file mode 100644 index 000000000000..3931a1c6eb74 --- /dev/null +++ b/drivers/input/misc/amd_sfh_tabletmode.c @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * AMD SFH tablet-mode switch driver + * + * Copyright (c) 2026, Advanced Micro Devices, Inc. + * All Rights Reserved. + * + * Author: Basavaraj Natikar <Basavaraj.Natikar@amd.com> + */ + +#include <linux/amd-pmf-io.h> +#include <linux/auxiliary_bus.h> +#include <linux/input.h> +#include <linux/module.h> +#include <linux/pci_ids.h> + +#define POLL_INTERVAL_MS 200 + +static void sfh_tm_poll(struct input_dev *input) +{ + struct amd_sfh_info info = {}; + + if (amd_get_sfh_info(&info, MT_OP_MODE)) + return; + + input_report_switch(input, SW_TABLET_MODE, + info.op_mode == SFH_MODE_TABLET); + input_sync(input); +} + +static int sfh_tm_probe(struct auxiliary_device *auxdev, + const struct auxiliary_device_id *id) +{ + struct device *dev = &auxdev->dev; + struct amd_sfh_info info = {}; + struct input_dev *input; + int error; + + error = amd_get_sfh_info(&info, MT_OP_MODE); + if (error) + return error == -EINVAL ? -ENODEV : error; + + input = devm_input_allocate_device(dev); + if (!input) + return -ENOMEM; + + input->name = "AMD SFH tablet mode switch"; + input->phys = "amd-sfh/tabletmode"; + input->id.bustype = BUS_HOST; + input->id.vendor = PCI_VENDOR_ID_AMD; + input_set_capability(input, EV_SW, SW_TABLET_MODE); + + error = input_setup_polling(input, sfh_tm_poll); + if (error) + return error; + input_set_poll_interval(input, POLL_INTERVAL_MS); + + sfh_tm_poll(input); + + error = input_register_device(input); + if (error) + return error; + + return 0; +} + +static const struct auxiliary_device_id sfh_tm_id_table[] = { + { .name = "amd_sfh.tabletmode" }, + {} +}; +MODULE_DEVICE_TABLE(auxiliary, sfh_tm_id_table); + +static struct auxiliary_driver sfh_tm_driver = { + .name = "tabletmode", + .id_table = sfh_tm_id_table, + .probe = sfh_tm_probe, +}; +module_auxiliary_driver(sfh_tm_driver); + +MODULE_DESCRIPTION("AMD SFH tablet mode switch"); +MODULE_LICENSE("GPL"); |
