Skip to content

Commit 5e0ae59

Browse files
Angela CzubakBenjamin Tissoires
authored andcommitted
HID: add haptics page defines
Introduce haptic usages as defined in HID Usage Tables specification. Add HID units for newton and gram. Signed-off-by: Angela Czubak <aczubak@google.com> Co-developed-by: Jonathan Denose <jdenose@google.com> Signed-off-by: Jonathan Denose <jdenose@google.com> Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
1 parent 02d6eee commit 5e0ae59

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

include/linux/hid.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ struct hid_item {
156156
#define HID_UP_TELEPHONY 0x000b0000
157157
#define HID_UP_CONSUMER 0x000c0000
158158
#define HID_UP_DIGITIZER 0x000d0000
159+
#define HID_UP_HAPTIC 0x000e0000
159160
#define HID_UP_PID 0x000f0000
160161
#define HID_UP_BATTERY 0x00850000
161162
#define HID_UP_CAMERA 0x00900000
@@ -316,6 +317,28 @@ struct hid_item {
316317
#define HID_DG_TOOLSERIALNUMBER 0x000d005b
317318
#define HID_DG_LATENCYMODE 0x000d0060
318319

320+
#define HID_HP_SIMPLECONTROLLER 0x000e0001
321+
#define HID_HP_WAVEFORMLIST 0x000e0010
322+
#define HID_HP_DURATIONLIST 0x000e0011
323+
#define HID_HP_AUTOTRIGGER 0x000e0020
324+
#define HID_HP_MANUALTRIGGER 0x000e0021
325+
#define HID_HP_AUTOTRIGGERASSOCIATEDCONTROL 0x000e0022
326+
#define HID_HP_INTENSITY 0x000e0023
327+
#define HID_HP_REPEATCOUNT 0x000e0024
328+
#define HID_HP_RETRIGGERPERIOD 0x000e0025
329+
#define HID_HP_WAVEFORMVENDORPAGE 0x000e0026
330+
#define HID_HP_WAVEFORMVENDORID 0x000e0027
331+
#define HID_HP_WAVEFORMCUTOFFTIME 0x000e0028
332+
#define HID_HP_WAVEFORMNONE 0x000e1001
333+
#define HID_HP_WAVEFORMSTOP 0x000e1002
334+
#define HID_HP_WAVEFORMCLICK 0x000e1003
335+
#define HID_HP_WAVEFORMBUZZCONTINUOUS 0x000e1004
336+
#define HID_HP_WAVEFORMRUMBLECONTINUOUS 0x000e1005
337+
#define HID_HP_WAVEFORMPRESS 0x000e1006
338+
#define HID_HP_WAVEFORMRELEASE 0x000e1007
339+
#define HID_HP_VENDORWAVEFORMMIN 0x000e2001
340+
#define HID_HP_VENDORWAVEFORMMAX 0x000e2fff
341+
319342
#define HID_BAT_ABSOLUTESTATEOFCHARGE 0x00850065
320343
#define HID_BAT_CHARGING 0x00850044
321344

@@ -423,6 +446,12 @@ struct hid_item {
423446
#define HID_REPORT_PROTOCOL 1
424447
#define HID_BOOT_PROTOCOL 0
425448

449+
/*
450+
* HID units
451+
*/
452+
#define HID_UNIT_GRAM 0x0101
453+
#define HID_UNIT_NEWTON 0xe111
454+
426455
/*
427456
* This is the global environment of the parser. This information is
428457
* persistent for main-items. The global environment can be saved and

0 commit comments

Comments
 (0)