aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 12:25:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 12:25:26 -0400
commit8de29a35dc840a05e451ad035bcb06e21ccf605f (patch)
treef887a98818ef7dd56c0c64c95039377931dcc903 /include
parent31f7dc796998d2967e999a0f9229d8a50c7b348d (diff)
parent2e455c27bddbf8cf6d1039daea40de8e6865c453 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina: - quite a few firmware fixes for RMI driver by Andrew Duggan - huion and uclogic drivers have been substantially overlaping in functionality laterly. This redundancy is fixed by hid-huion driver being merged into hid-uclogic; work done by Benjamin Tissoires and Nikolai Kondrashov - i2c-hid now supports ACPI GPIO interrupts; patch from Mika Westerberg - Some of the quirks, that got separated into individual drivers, have historically had EXPERT dependency. As HID subsystem matured (as well as the individual drivers), this made less and less sense. This dependency is now being removed by patch from Jean Delvare - Logitech lg4ff driver received a couple of improvements for mode switching, by Michal MalĂ˝ - multitouch driver now supports clickpads, patches by Benjamin Tissoires and Seth Forshee - hid-sensor framework received a substantial update; namely support for Custom and Generic pages is being added; work done by Srinivas Pandruvada - wacom driver received substantial update; it now supports i2c-conntected devices (Mika Westerberg), Bamboo PADs are now properly supported (Benjamin Tissoires), much improved battery reporting (Jason Gerecke) and pen proximity cleanups (Ping Cheng) - small assorted fixes and device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (68 commits) HID: sensor: Update document for custom sensor HID: sensor: Custom and Generic sensor support HID: debug: fix error handling in hid_debug_events_read() Input - mt: Fix input_mt_get_slot_by_key HID: logitech-hidpp: fix error return code HID: wacom: Add support for Cintiq 13HD Touch HID: logitech-hidpp: add a module parameter to keep firmware gestures HID: usbhid: yet another mouse with ALWAYS_POLL HID: usbhid: more mice with ALWAYS_POLL HID: wacom: set stylus_in_proximity before checking touch_down HID: wacom: use wacom_wac_finger_count_touches to set touch_down HID: wacom: remove hardcoded WACOM_QUIRK_MULTI_INPUT HID: pidff: effect can't be NULL HID: add quirk for PIXART OEM mouse used by HP HID: add HP OEM mouse to quirk ALWAYS_POLL HID: wacom: ask for a in-prox report when it was missed HID: hid-sensor-hub: Fix sparse warning HID: hid-sensor-hub: fix attribute read for logical usage id HID: plantronics: fix Kconfig default HID: pidff: support more than one concurrent effect ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/hid-sensor-hub.h55
-rw-r--r--include/linux/hid-sensor-ids.h2
-rw-r--r--include/linux/hid.h2
-rw-r--r--include/uapi/linux/input.h4
4 files changed, 53 insertions, 10 deletions
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h
index 4173a8fdad9e..0408421d885f 100644
--- a/include/linux/hid-sensor-hub.h
+++ b/include/linux/hid-sensor-hub.h
@@ -49,19 +49,43 @@ struct hid_sensor_hub_attribute_info {
49}; 49};
50 50
51/** 51/**
52 * struct sensor_hub_pending - Synchronous read pending information
53 * @status: Pending status true/false.
54 * @ready: Completion synchronization data.
55 * @usage_id: Usage id for physical device, E.g. Gyro usage id.
56 * @attr_usage_id: Usage Id of a field, E.g. X-AXIS for a gyro.
57 * @raw_size: Response size for a read request.
58 * @raw_data: Place holder for received response.
59 */
60struct sensor_hub_pending {
61 bool status;
62 struct completion ready;
63 u32 usage_id;
64 u32 attr_usage_id;
65 int raw_size;
66 u8 *raw_data;
67};
68
69/**
52 * struct hid_sensor_hub_device - Stores the hub instance data 70 * struct hid_sensor_hub_device - Stores the hub instance data
53 * @hdev: Stores the hid instance. 71 * @hdev: Stores the hid instance.
54 * @vendor_id: Vendor id of hub device. 72 * @vendor_id: Vendor id of hub device.
55 * @product_id: Product id of hub device. 73 * @product_id: Product id of hub device.
74 * @usage: Usage id for this hub device instance.
56 * @start_collection_index: Starting index for a phy type collection 75 * @start_collection_index: Starting index for a phy type collection
57 * @end_collection_index: Last index for a phy type collection 76 * @end_collection_index: Last index for a phy type collection
77 * @mutex: synchronizing mutex.
78 * @pending: Holds information of pending sync read request.
58 */ 79 */
59struct hid_sensor_hub_device { 80struct hid_sensor_hub_device {
60 struct hid_device *hdev; 81 struct hid_device *hdev;
61 u32 vendor_id; 82 u32 vendor_id;
62 u32 product_id; 83 u32 product_id;
84 u32 usage;
63 int start_collection_index; 85 int start_collection_index;
64 int end_collection_index; 86 int end_collection_index;
87 struct mutex mutex;
88 struct sensor_hub_pending pending;
65}; 89};
66 90
67/** 91/**
@@ -152,40 +176,51 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
152* @usage_id: Attribute usage id of parent physical device as per spec 176* @usage_id: Attribute usage id of parent physical device as per spec
153* @attr_usage_id: Attribute usage id as per spec 177* @attr_usage_id: Attribute usage id as per spec
154* @report_id: Report id to look for 178* @report_id: Report id to look for
179* @flag: Synchronous or asynchronous read
155* 180*
156* Issues a synchronous read request for an input attribute. Returns 181* Issues a synchronous or asynchronous read request for an input attribute.
157* data upto 32 bits. Since client can get events, so this call should 182* Returns data upto 32 bits.
158* not be used for data paths, this will impact performance.
159*/ 183*/
160 184
185enum sensor_hub_read_flags {
186 SENSOR_HUB_SYNC,
187 SENSOR_HUB_ASYNC,
188};
189
161int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev, 190int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev,
162 u32 usage_id, 191 u32 usage_id,
163 u32 attr_usage_id, u32 report_id); 192 u32 attr_usage_id, u32 report_id,
193 enum sensor_hub_read_flags flag
194);
195
164/** 196/**
165* sensor_hub_set_feature() - Feature set request 197* sensor_hub_set_feature() - Feature set request
166* @hsdev: Hub device instance. 198* @hsdev: Hub device instance.
167* @report_id: Report id to look for 199* @report_id: Report id to look for
168* @field_index: Field index inside a report 200* @field_index: Field index inside a report
169* @value: Value to set 201* @buffer_size: size of the buffer
202* @buffer: buffer to use in the feature set
170* 203*
171* Used to set a field in feature report. For example this can set polling 204* Used to set a field in feature report. For example this can set polling
172* interval, sensitivity, activate/deactivate state. 205* interval, sensitivity, activate/deactivate state.
173*/ 206*/
174int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, 207int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
175 u32 field_index, s32 value); 208 u32 field_index, int buffer_size, void *buffer);
176 209
177/** 210/**
178* sensor_hub_get_feature() - Feature get request 211* sensor_hub_get_feature() - Feature get request
179* @hsdev: Hub device instance. 212* @hsdev: Hub device instance.
180* @report_id: Report id to look for 213* @report_id: Report id to look for
181* @field_index: Field index inside a report 214* @field_index: Field index inside a report
182* @value: Place holder for return value 215* @buffer_size: size of the buffer
216* @buffer: buffer to copy output
183* 217*
184* Used to get a field in feature report. For example this can get polling 218* Used to get a field in feature report. For example this can get polling
185* interval, sensitivity, activate/deactivate state. 219* interval, sensitivity, activate/deactivate state. On success it returns
220* number of bytes copied to buffer. On failure, it returns value < 0.
186*/ 221*/
187int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, 222int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
188 u32 field_index, s32 *value); 223 u32 field_index, int buffer_size, void *buffer);
189 224
190/* hid-sensor-attributes */ 225/* hid-sensor-attributes */
191 226
diff --git a/include/linux/hid-sensor-ids.h b/include/linux/hid-sensor-ids.h
index 109f0e633e01..f2ee90aed0c2 100644
--- a/include/linux/hid-sensor-ids.h
+++ b/include/linux/hid-sensor-ids.h
@@ -21,6 +21,8 @@
21 21
22#define HID_MAX_PHY_DEVICES 0xFF 22#define HID_MAX_PHY_DEVICES 0xFF
23 23
24#define HID_USAGE_SENSOR_COLLECTION 0x200001
25
24/* Accel 3D (200073) */ 26/* Accel 3D (200073) */
25#define HID_USAGE_SENSOR_ACCEL_3D 0x200073 27#define HID_USAGE_SENSOR_ACCEL_3D 0x200073
26#define HID_USAGE_SENSOR_DATA_ACCELERATION 0x200452 28#define HID_USAGE_SENSOR_DATA_ACCELERATION 0x200452
diff --git a/include/linux/hid.h b/include/linux/hid.h
index f94cf28e4b7c..176b43670e5d 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -159,6 +159,7 @@ struct hid_item {
159#define HID_UP_LED 0x00080000 159#define HID_UP_LED 0x00080000
160#define HID_UP_BUTTON 0x00090000 160#define HID_UP_BUTTON 0x00090000
161#define HID_UP_ORDINAL 0x000a0000 161#define HID_UP_ORDINAL 0x000a0000
162#define HID_UP_TELEPHONY 0x000b0000
162#define HID_UP_CONSUMER 0x000c0000 163#define HID_UP_CONSUMER 0x000c0000
163#define HID_UP_DIGITIZER 0x000d0000 164#define HID_UP_DIGITIZER 0x000d0000
164#define HID_UP_PID 0x000f0000 165#define HID_UP_PID 0x000f0000
@@ -269,6 +270,7 @@ struct hid_item {
269#define HID_DG_DEVICEINDEX 0x000d0053 270#define HID_DG_DEVICEINDEX 0x000d0053
270#define HID_DG_CONTACTCOUNT 0x000d0054 271#define HID_DG_CONTACTCOUNT 0x000d0054
271#define HID_DG_CONTACTMAX 0x000d0055 272#define HID_DG_CONTACTMAX 0x000d0055
273#define HID_DG_BUTTONTYPE 0x000d0059
272#define HID_DG_BARRELSWITCH2 0x000d005a 274#define HID_DG_BARRELSWITCH2 0x000d005a
273#define HID_DG_TOOLSERIALNUMBER 0x000d005b 275#define HID_DG_TOOLSERIALNUMBER 0x000d005b
274 276
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
index 2f62ab2d7bf9..8038e9aa3b95 100644
--- a/include/uapi/linux/input.h
+++ b/include/uapi/linux/input.h
@@ -702,6 +702,10 @@ struct input_keymap_entry {
702#define KEY_NUMERIC_9 0x209 702#define KEY_NUMERIC_9 0x209
703#define KEY_NUMERIC_STAR 0x20a 703#define KEY_NUMERIC_STAR 0x20a
704#define KEY_NUMERIC_POUND 0x20b 704#define KEY_NUMERIC_POUND 0x20b
705#define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */
706#define KEY_NUMERIC_B 0x20d
707#define KEY_NUMERIC_C 0x20e
708#define KEY_NUMERIC_D 0x20f
705 709
706#define KEY_CAMERA_FOCUS 0x210 710#define KEY_CAMERA_FOCUS 0x210
707#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ 711#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */