History

Merge tag 'hid-for-linus-2025093001' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

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 ...

Linus Torvalds committed 1 year ago

Commit 54ba6d92 parents b664517 cd3770634 files · +3116 −1267Browse files

Showing the changes to include/uapi (3 of 34 files). Show all

Unified · Split

3 files
  1. include/uapi/linux/hidraw.h +2 −0
  2. include/uapi/linux/input-event-codes.h +1 −0
  3. include/uapi/linux/input.h +21 −1
include/uapi/linux/hidraw.h+2−0
@@ -48,6 +48,8 @@ struct hidraw_devinfo { · 47 unmodified lines
4848 #define HIDIOCGOUTPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0C, len)
4949 #define HIDIOCREVOKE _IOW('H', 0x0D, int) /* Revoke device access */
5050
51+#define HIDIOCTL_LAST _IOC_NR(HIDIOCREVOKE)
52+
5153 #define HIDRAW_FIRST_MINOR 0
5254 #define HIDRAW_MAX_DEVICES 64
5355 /* number of reports to buffer */
include/uapi/linux/input-event-codes.h+1−0
@@ -27,6 +27,7 @@ · 26 unmodified lines
2727 #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */
2828 #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */
2929 #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */
30+#define INPUT_PROP_HAPTIC_TOUCHPAD 0x07 /* is a haptic touchpad */
3031
3132 #define INPUT_PROP_MAX 0x1f
3233 #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
include/uapi/linux/input.h+21−1
@@ -429,6 +429,24 @@ struct ff_rumble_effect { · 428 unmodified lines
429429 __u16 weak_magnitude;
430430 };
431431
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+
432450 /**
433451 * struct ff_effect - defines force feedback effect
434452 * @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING,
@@ -465,6 +483,7 @@ struct ff_effect { · 30 unmodified lines
465483 struct ff_periodic_effect periodic;
466484 struct ff_condition_effect condition[2]; /* One for each axis */
467485 struct ff_rumble_effect rumble;
486+ struct ff_haptic_effect haptic;
468487 } u;
469488 };
470489
@@ -472,6 +491,7 @@ struct ff_effect { · 1 unmodified line
472491 * Force feedback effect types
473492 */
474493
494+#define FF_HAPTIC 0x4f
475495 #define FF_RUMBLE 0x50
476496 #define FF_PERIODIC 0x51
477497 #define FF_CONSTANT 0x52
@@ -481,7 +501,7 @@ struct ff_effect { · 3 unmodified lines
481501 #define FF_INERTIA 0x56
482502 #define FF_RAMP 0x57
483503
484−#define FF_EFFECT_MIN FF_RUMBLE
504+#define FF_EFFECT_MIN FF_HAPTIC
485505 #define FF_EFFECT_MAX FF_RAMP
486506
487507 /*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t