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
48#define HIDIOCGOUTPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0C, len)48#define HIDIOCGOUTPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0C, len)
49#define HIDIOCREVOKE _IOW('H', 0x0D, int) /* Revoke device access */49#define HIDIOCREVOKE _IOW('H', 0x0D, int) /* Revoke device access */
50 50
51#define HIDIOCTL_LAST _IOC_NR(HIDIOCREVOKE)
52
51#define HIDRAW_FIRST_MINOR 053#define HIDRAW_FIRST_MINOR 0
52#define HIDRAW_MAX_DEVICES 6454#define HIDRAW_MAX_DEVICES 64
53/* number of reports to buffer */55/* number of reports to buffer */
include/uapi/linux/input-event-codes.h+1−0
@@ -27,6 +27,7 @@ · 26 unmodified lines
27#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */27#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */
28#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */28#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */
29#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */29#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */
30#define INPUT_PROP_HAPTIC_TOUCHPAD 0x07 /* is a haptic touchpad */
30 31
31#define INPUT_PROP_MAX 0x1f32#define INPUT_PROP_MAX 0x1f
32#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)33#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
429 __u16 weak_magnitude;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 */
441struct 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 * struct ff_effect - defines force feedback effect451 * struct ff_effect - defines force feedback effect
434 * @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING,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 struct ff_periodic_effect periodic;483 struct ff_periodic_effect periodic;
466 struct ff_condition_effect condition[2]; /* One for each axis */484 struct ff_condition_effect condition[2]; /* One for each axis */
467 struct ff_rumble_effect rumble;485 struct ff_rumble_effect rumble;
486 struct ff_haptic_effect haptic;
468 } u;487 } u;
469};488};
470 489
@@ -472,6 +491,7 @@ struct ff_effect { · 1 unmodified line
472 * Force feedback effect types491 * Force feedback effect types
473 */492 */
474 493
494#define FF_HAPTIC 0x4f
475#define FF_RUMBLE 0x50495#define FF_RUMBLE 0x50
476#define FF_PERIODIC 0x51496#define FF_PERIODIC 0x51
477#define FF_CONSTANT 0x52497#define FF_CONSTANT 0x52
@@ -481,7 +501,7 @@ struct ff_effect { · 3 unmodified lines
481#define FF_INERTIA 0x56501#define FF_INERTIA 0x56
482#define FF_RAMP 0x57502#define FF_RAMP 0x57
483 503
484#define FF_EFFECT_MIN FF_RUMBLE504#define FF_EFFECT_MIN FF_HAPTIC
485#define FF_EFFECT_MAX FF_RAMP505#define FF_EFFECT_MAX FF_RAMP
486 506
487/*507/*

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