aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
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 /drivers/iio
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 'drivers/iio')
-rw-r--r--drivers/iio/accel/hid-sensor-accel-3d.c3
-rw-r--r--drivers/iio/common/hid-sensors/hid-sensor-attributes.c24
-rw-r--r--drivers/iio/common/hid-sensors/hid-sensor-trigger.c13
-rw-r--r--drivers/iio/gyro/hid-sensor-gyro-3d.c3
-rw-r--r--drivers/iio/light/hid-sensor-als.c3
-rw-r--r--drivers/iio/light/hid-sensor-prox.c3
-rw-r--r--drivers/iio/magnetometer/hid-sensor-magn-3d.c3
-rw-r--r--drivers/iio/orientation/hid-sensor-incl-3d.c3
-rw-r--r--drivers/iio/pressure/hid-sensor-press.c3
9 files changed, 33 insertions, 25 deletions
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
index df6a593bd4bd..2b4fad6998c1 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -123,7 +123,8 @@ static int accel_3d_read_raw(struct iio_dev *indio_dev,
123 *val = sensor_hub_input_attr_get_raw_value( 123 *val = sensor_hub_input_attr_get_raw_value(
124 accel_state->common_attributes.hsdev, 124 accel_state->common_attributes.hsdev,
125 HID_USAGE_SENSOR_ACCEL_3D, address, 125 HID_USAGE_SENSOR_ACCEL_3D, address,
126 report_id); 126 report_id,
127 SENSOR_HUB_SYNC);
127 else { 128 else {
128 *val = 0; 129 *val = 0;
129 hid_sensor_power_state(&accel_state->common_attributes, 130 hid_sensor_power_state(&accel_state->common_attributes,
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
index 25b01e156d82..e81f434760f4 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
@@ -153,8 +153,8 @@ s32 hid_sensor_read_poll_value(struct hid_sensor_common *st)
153 int ret; 153 int ret;
154 154
155 ret = sensor_hub_get_feature(st->hsdev, 155 ret = sensor_hub_get_feature(st->hsdev,
156 st->poll.report_id, 156 st->poll.report_id,
157 st->poll.index, &value); 157 st->poll.index, sizeof(value), &value);
158 158
159 if (ret < 0 || value < 0) { 159 if (ret < 0 || value < 0) {
160 return -EINVAL; 160 return -EINVAL;
@@ -174,8 +174,8 @@ int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st,
174 int ret; 174 int ret;
175 175
176 ret = sensor_hub_get_feature(st->hsdev, 176 ret = sensor_hub_get_feature(st->hsdev,
177 st->poll.report_id, 177 st->poll.report_id,
178 st->poll.index, &value); 178 st->poll.index, sizeof(value), &value);
179 if (ret < 0 || value < 0) { 179 if (ret < 0 || value < 0) {
180 *val1 = *val2 = 0; 180 *val1 = *val2 = 0;
181 return -EINVAL; 181 return -EINVAL;
@@ -212,9 +212,8 @@ int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,
212 else 212 else
213 value = 0; 213 value = 0;
214 } 214 }
215 ret = sensor_hub_set_feature(st->hsdev, 215 ret = sensor_hub_set_feature(st->hsdev, st->poll.report_id,
216 st->poll.report_id, 216 st->poll.index, sizeof(value), &value);
217 st->poll.index, value);
218 if (ret < 0 || value < 0) 217 if (ret < 0 || value < 0)
219 ret = -EINVAL; 218 ret = -EINVAL;
220 219
@@ -229,8 +228,9 @@ int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st,
229 int ret; 228 int ret;
230 229
231 ret = sensor_hub_get_feature(st->hsdev, 230 ret = sensor_hub_get_feature(st->hsdev,
232 st->sensitivity.report_id, 231 st->sensitivity.report_id,
233 st->sensitivity.index, &value); 232 st->sensitivity.index, sizeof(value),
233 &value);
234 if (ret < 0 || value < 0) { 234 if (ret < 0 || value < 0) {
235 *val1 = *val2 = 0; 235 *val1 = *val2 = 0;
236 return -EINVAL; 236 return -EINVAL;
@@ -253,9 +253,9 @@ int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,
253 value = convert_to_vtf_format(st->sensitivity.size, 253 value = convert_to_vtf_format(st->sensitivity.size,
254 st->sensitivity.unit_expo, 254 st->sensitivity.unit_expo,
255 val1, val2); 255 val1, val2);
256 ret = sensor_hub_set_feature(st->hsdev, 256 ret = sensor_hub_set_feature(st->hsdev, st->sensitivity.report_id,
257 st->sensitivity.report_id, 257 st->sensitivity.index, sizeof(value),
258 st->sensitivity.index, value); 258 &value);
259 if (ret < 0 || value < 0) 259 if (ret < 0 || value < 0)
260 ret = -EINVAL; 260 ret = -EINVAL;
261 261
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
index 2f1d535b94c4..610fc98f88ef 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
@@ -68,20 +68,21 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)
68 if (state_val >= 0) { 68 if (state_val >= 0) {
69 state_val += st->power_state.logical_minimum; 69 state_val += st->power_state.logical_minimum;
70 sensor_hub_set_feature(st->hsdev, st->power_state.report_id, 70 sensor_hub_set_feature(st->hsdev, st->power_state.report_id,
71 st->power_state.index, 71 st->power_state.index, sizeof(state_val),
72 (s32)state_val); 72 &state_val);
73 } 73 }
74 74
75 if (report_val >= 0) { 75 if (report_val >= 0) {
76 report_val += st->report_state.logical_minimum; 76 report_val += st->report_state.logical_minimum;
77 sensor_hub_set_feature(st->hsdev, st->report_state.report_id, 77 sensor_hub_set_feature(st->hsdev, st->report_state.report_id,
78 st->report_state.index, 78 st->report_state.index,
79 (s32)report_val); 79 sizeof(report_val),
80 &report_val);
80 } 81 }
81 82
82 sensor_hub_get_feature(st->hsdev, st->power_state.report_id, 83 sensor_hub_get_feature(st->hsdev, st->power_state.report_id,
83 st->power_state.index, 84 st->power_state.index,
84 &state_val); 85 sizeof(state_val), &state_val);
85 if (state && poll_value) 86 if (state && poll_value)
86 msleep_interruptible(poll_value * 2); 87 msleep_interruptible(poll_value * 2);
87 88
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c
index a3c3e19de527..b5883b6f4e50 100644
--- a/drivers/iio/gyro/hid-sensor-gyro-3d.c
+++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c
@@ -123,7 +123,8 @@ static int gyro_3d_read_raw(struct iio_dev *indio_dev,
123 *val = sensor_hub_input_attr_get_raw_value( 123 *val = sensor_hub_input_attr_get_raw_value(
124 gyro_state->common_attributes.hsdev, 124 gyro_state->common_attributes.hsdev,
125 HID_USAGE_SENSOR_GYRO_3D, address, 125 HID_USAGE_SENSOR_GYRO_3D, address,
126 report_id); 126 report_id,
127 SENSOR_HUB_SYNC);
127 else { 128 else {
128 *val = 0; 129 *val = 0;
129 hid_sensor_power_state(&gyro_state->common_attributes, 130 hid_sensor_power_state(&gyro_state->common_attributes,
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c
index 948acfc38b8c..1609ecdd01b0 100644
--- a/drivers/iio/light/hid-sensor-als.c
+++ b/drivers/iio/light/hid-sensor-als.c
@@ -101,7 +101,8 @@ static int als_read_raw(struct iio_dev *indio_dev,
101 *val = sensor_hub_input_attr_get_raw_value( 101 *val = sensor_hub_input_attr_get_raw_value(
102 als_state->common_attributes.hsdev, 102 als_state->common_attributes.hsdev,
103 HID_USAGE_SENSOR_ALS, address, 103 HID_USAGE_SENSOR_ALS, address,
104 report_id); 104 report_id,
105 SENSOR_HUB_SYNC);
105 hid_sensor_power_state(&als_state->common_attributes, 106 hid_sensor_power_state(&als_state->common_attributes,
106 false); 107 false);
107 } else { 108 } else {
diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c
index 3ecf79ed08ac..91ecc46ffeaa 100644
--- a/drivers/iio/light/hid-sensor-prox.c
+++ b/drivers/iio/light/hid-sensor-prox.c
@@ -96,7 +96,8 @@ static int prox_read_raw(struct iio_dev *indio_dev,
96 *val = sensor_hub_input_attr_get_raw_value( 96 *val = sensor_hub_input_attr_get_raw_value(
97 prox_state->common_attributes.hsdev, 97 prox_state->common_attributes.hsdev,
98 HID_USAGE_SENSOR_PROX, address, 98 HID_USAGE_SENSOR_PROX, address,
99 report_id); 99 report_id,
100 SENSOR_HUB_SYNC);
100 hid_sensor_power_state(&prox_state->common_attributes, 101 hid_sensor_power_state(&prox_state->common_attributes,
101 false); 102 false);
102 } else { 103 } else {
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
index d22993b4066a..4f9c0be24451 100644
--- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
+++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
@@ -170,7 +170,8 @@ static int magn_3d_read_raw(struct iio_dev *indio_dev,
170 *val = sensor_hub_input_attr_get_raw_value( 170 *val = sensor_hub_input_attr_get_raw_value(
171 magn_state->common_attributes.hsdev, 171 magn_state->common_attributes.hsdev,
172 HID_USAGE_SENSOR_COMPASS_3D, address, 172 HID_USAGE_SENSOR_COMPASS_3D, address,
173 report_id); 173 report_id,
174 SENSOR_HUB_SYNC);
174 else { 175 else {
175 *val = 0; 176 *val = 0;
176 hid_sensor_power_state(&magn_state->common_attributes, 177 hid_sensor_power_state(&magn_state->common_attributes,
diff --git a/drivers/iio/orientation/hid-sensor-incl-3d.c b/drivers/iio/orientation/hid-sensor-incl-3d.c
index 73854460bb2c..5930fa32a2ab 100644
--- a/drivers/iio/orientation/hid-sensor-incl-3d.c
+++ b/drivers/iio/orientation/hid-sensor-incl-3d.c
@@ -124,7 +124,8 @@ static int incl_3d_read_raw(struct iio_dev *indio_dev,
124 *val = sensor_hub_input_attr_get_raw_value( 124 *val = sensor_hub_input_attr_get_raw_value(
125 incl_state->common_attributes.hsdev, 125 incl_state->common_attributes.hsdev,
126 HID_USAGE_SENSOR_INCLINOMETER_3D, address, 126 HID_USAGE_SENSOR_INCLINOMETER_3D, address,
127 report_id); 127 report_id,
128 SENSOR_HUB_SYNC);
128 else { 129 else {
129 hid_sensor_power_state(&incl_state->common_attributes, 130 hid_sensor_power_state(&incl_state->common_attributes,
130 false); 131 false);
diff --git a/drivers/iio/pressure/hid-sensor-press.c b/drivers/iio/pressure/hid-sensor-press.c
index 1af314926ebd..7bb8d4c1f7df 100644
--- a/drivers/iio/pressure/hid-sensor-press.c
+++ b/drivers/iio/pressure/hid-sensor-press.c
@@ -100,7 +100,8 @@ static int press_read_raw(struct iio_dev *indio_dev,
100 *val = sensor_hub_input_attr_get_raw_value( 100 *val = sensor_hub_input_attr_get_raw_value(
101 press_state->common_attributes.hsdev, 101 press_state->common_attributes.hsdev,
102 HID_USAGE_SENSOR_PRESSURE, address, 102 HID_USAGE_SENSOR_PRESSURE, address,
103 report_id); 103 report_id,
104 SENSOR_HUB_SYNC);
104 hid_sensor_power_state(&press_state->common_attributes, 105 hid_sensor_power_state(&press_state->common_attributes,
105 false); 106 false);
106 } else { 107 } else {