Pull HID updates from Benjamin Tissoires: - haptic touchpad support (Angela Czubak and Jonathan Denose) - support for audio jack handling on DualSense Playstation controllers (Cristian Ciocaltea) - allow HID-BPF to rebind a driver to hid-multitouch (Benjamin Tissoires) - rework hidraw ioctls to make them safer (and tested) (Benjamin Tissoires) - various PIDFF and universal-PIDFF fixes/improvements (Tomasz Pakuła) - better configuration of Intel QuickI2C through ACPI (Xinpeng Sun) - other assorted cleanups and fixes * tag 'hid-for-linus-2025093001' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (58 commits) HID: playstation: Switch to scoped_guard() in {dualsense|dualshock4}_output_worker() HID: playstation: Silence sparse warnings for locking context imbalances HID: playstation: Update SP preamp gain comment line HID: intel-thc-hid: intel-quicki2c: support ACPI config for advanced features HID: core: Change hid_driver to use a const char* for name HID: hidraw: tighten ioctl command parsing selftests/hid: hidraw: forge wrong ioctls and tests them selftests/hid: hidraw: add more coverage for hidraw ioctls selftests/hid: update vmtest.sh for virtme-ng HID: playstation: Support DualSense audio jack event reporting HID: playstation: Support DualSense audio jack hotplug detection HID: playstation: Redefine DualSense input report status field HID: playstation: Prefer kzalloc(sizeof(*buf)...) HID: playstation: Document spinlock_t usage HID: playstation: Fix all alignment and line length issues HID: playstation: Correct spelling in comment sections HID: playstation: Replace uint{32,16,8}_t with u{32,16,8} HID: playstation: Simplify locking with guard() and scoped_guard() HID: playstation: Add spaces around arithmetic operators HID: playstation: Make use of bitfield macros ...
Showing the changes to include/uapi (3 of 34 files). Show all
Unified · Split
| @@ -48,6 +48,8 @@ struct hidraw_devinfo { · 47 unmodified lines | ||
| 48 | 48 | #define HIDIOCGOUTPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0C, len) |
| 49 | 49 | #define HIDIOCREVOKE _IOW('H', 0x0D, int) /* Revoke device access */ |
| 50 | 50 | |
| 51 | +#define HIDIOCTL_LAST _IOC_NR(HIDIOCREVOKE) | |
| 52 | + | |
| 51 | 53 | #define HIDRAW_FIRST_MINOR 0 |
| 52 | 54 | #define HIDRAW_MAX_DEVICES 64 |
| 53 | 55 | /* number of reports to buffer */ |
| @@ -27,6 +27,7 @@ · 26 unmodified lines | ||
| 27 | 27 | #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ |
| 28 | 28 | #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ |
| 29 | 29 | #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ |
| 30 | +#define INPUT_PROP_HAPTIC_TOUCHPAD 0x07 /* is a haptic touchpad */ | |
| 30 | 31 | |
| 31 | 32 | #define INPUT_PROP_MAX 0x1f |
| 32 | 33 | #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) |
| @@ -429,6 +429,24 @@ struct ff_rumble_effect { · 428 unmodified lines | ||
| 429 | 429 | __u16 weak_magnitude; |
| 430 | 430 | }; |
| 431 | 431 | |
| 432 | +/** | |
| 433 | + * struct ff_haptic_effect | |
| 434 | + * @hid_usage: hid_usage according to Haptics page (WAVEFORM_CLICK, etc.) | |
| 435 | + * @vendor_id: the waveform vendor ID if hid_usage is in the vendor-defined range | |
| 436 | + * @vendor_waveform_page: the vendor waveform page if hid_usage is in the vendor-defined range | |
| 437 | + * @intensity: strength of the effect as percentage | |
| 438 | + * @repeat_count: number of times to retrigger effect | |
| 439 | + * @retrigger_period: time before effect is retriggered (in ms) | |
| 440 | + */ | |
| 441 | +struct ff_haptic_effect { | |
| 442 | + __u16 hid_usage; | |
| 443 | + __u16 vendor_id; | |
| 444 | + __u8 vendor_waveform_page; | |
| 445 | + __u16 intensity; | |
| 446 | + __u16 repeat_count; | |
| 447 | + __u16 retrigger_period; | |
| 448 | +}; | |
| 449 | + | |
| 432 | 450 | /** |
| 433 | 451 | * struct ff_effect - defines force feedback effect |
| 434 | 452 | * @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING, |
| @@ -465,6 +483,7 @@ struct ff_effect { · 30 unmodified lines | ||
| 465 | 483 | struct ff_periodic_effect periodic; |
| 466 | 484 | struct ff_condition_effect condition[2]; /* One for each axis */ |
| 467 | 485 | struct ff_rumble_effect rumble; |
| 486 | + struct ff_haptic_effect haptic; | |
| 468 | 487 | } u; |
| 469 | 488 | }; |
| 470 | 489 | |
| @@ -472,6 +491,7 @@ struct ff_effect { · 1 unmodified line | ||
| 472 | 491 | * Force feedback effect types |
| 473 | 492 | */ |
| 474 | 493 | |
| 494 | +#define FF_HAPTIC 0x4f | |
| 475 | 495 | #define FF_RUMBLE 0x50 |
| 476 | 496 | #define FF_PERIODIC 0x51 |
| 477 | 497 | #define FF_CONSTANT 0x52 |
| @@ -481,7 +501,7 @@ struct ff_effect { · 3 unmodified lines | ||
| 481 | 501 | #define FF_INERTIA 0x56 |
| 482 | 502 | #define FF_RAMP 0x57 |
| 483 | 503 | |
| 484 | −#define FF_EFFECT_MIN FF_RUMBLE | |
| 504 | +#define FF_EFFECT_MIN FF_HAPTIC | |
| 485 | 505 | #define FF_EFFECT_MAX FF_RAMP |
| 486 | 506 | |
| 487 | 507 | /* |