diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/hid.h | 17 | ||||
| -rw-r--r-- | include/uapi/linux/input-event-codes.h | 2 | 
2 files changed, 18 insertions, 1 deletions
| diff --git a/include/linux/hid.h b/include/linux/hid.h index a355d61940f2..d99287327ef2 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -219,6 +219,7 @@ struct hid_item {  #define HID_GD_VBRZ		0x00010045  #define HID_GD_VNO		0x00010046  #define HID_GD_FEATURE		0x00010047 +#define HID_GD_RESOLUTION_MULTIPLIER	0x00010048  #define HID_GD_SYSTEM_CONTROL	0x00010080  #define HID_GD_UP		0x00010090  #define HID_GD_DOWN		0x00010091 @@ -232,12 +233,14 @@ struct hid_item {  #define HID_DC_BATTERYSTRENGTH	0x00060020  #define HID_CP_CONSUMER_CONTROL	0x000c0001 +#define HID_CP_AC_PAN		0x000c0238  #define HID_DG_DIGITIZER	0x000d0001  #define HID_DG_PEN		0x000d0002  #define HID_DG_LIGHTPEN		0x000d0003  #define HID_DG_TOUCHSCREEN	0x000d0004  #define HID_DG_TOUCHPAD		0x000d0005 +#define HID_DG_WHITEBOARD	0x000d0006  #define HID_DG_STYLUS		0x000d0020  #define HID_DG_PUCK		0x000d0021  #define HID_DG_FINGER		0x000d0022 @@ -427,6 +430,7 @@ struct hid_local {   */  struct hid_collection { +	struct hid_collection *parent;  	unsigned type;  	unsigned usage;  	unsigned level; @@ -436,12 +440,16 @@ struct hid_usage {  	unsigned  hid;			/* hid usage code */  	unsigned  collection_index;	/* index into collection array */  	unsigned  usage_index;		/* index into usage array */ +	__s8	  resolution_multiplier;/* Effective Resolution Multiplier +					   (HUT v1.12, 4.3.1), default: 1 */  	/* hidinput data */ +	__s8	  wheel_factor;		/* 120/resolution_multiplier */  	__u16     code;			/* input driver code */  	__u8      type;			/* input driver type */  	__s8	  hat_min;		/* hat switch fun */  	__s8	  hat_max;		/* ditto */  	__s8	  hat_dir;		/* ditto */ +	__s16	  wheel_accumulated;	/* hi-res wheel */  };  struct hid_input; @@ -650,6 +658,7 @@ struct hid_parser {  	unsigned int         *collection_stack;  	unsigned int          collection_stack_ptr;  	unsigned int          collection_stack_size; +	struct hid_collection *active_collection;  	struct hid_device    *device;  	unsigned int          scan_flags;  }; @@ -836,7 +845,11 @@ static inline bool hid_is_using_ll_driver(struct hid_device *hdev,  /* Applications from HID Usage Tables 4/8/99 Version 1.1 */  /* We ignore a few input applications that are not widely used */ -#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001) || ((a >= 0x000d0002) && (a <= 0x000d0006))) +#define IS_INPUT_APPLICATION(a) \ +		(((a >= HID_UP_GENDESK) && (a <= HID_GD_MULTIAXIS)) \ +		|| ((a >= HID_DG_PEN) && (a <= HID_DG_WHITEBOARD)) \ +		|| (a == HID_GD_SYSTEM_CONTROL) || (a == HID_CP_CONSUMER_CONTROL) \ +		|| (a == HID_GD_WIRELESS_RADIO_CTLS))  /* HID core API */ @@ -892,6 +905,8 @@ struct hid_report *hid_validate_values(struct hid_device *hid,  				       unsigned int type, unsigned int id,  				       unsigned int field_index,  				       unsigned int report_counts); + +void hid_setup_resolution_multiplier(struct hid_device *hid);  int hid_open_report(struct hid_device *device);  int hid_check_keys_pressed(struct hid_device *hid);  int hid_connect(struct hid_device *hid, unsigned int connect_mask); diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index ae366b87426a..7f14d4a66c28 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -716,6 +716,8 @@   * the situation described above.   */  #define REL_RESERVED		0x0a +#define REL_WHEEL_HI_RES	0x0b +#define REL_HWHEEL_HI_RES	0x0c  #define REL_MAX			0x0f  #define REL_CNT			(REL_MAX+1) | 
