diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/adp5588-keys.c | 1 | ||||
-rw-r--r-- | drivers/input/misc/cm109.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/bcm5974.c | 20 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 14 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 52 | ||||
-rw-r--r-- | drivers/input/touchscreen/wacom_w8001.c | 2 |
6 files changed, 60 insertions, 31 deletions
diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c index b570ed30e8a1..4a7f534cf64b 100644 --- a/drivers/input/keyboard/adp5588-keys.c +++ b/drivers/input/keyboard/adp5588-keys.c | |||
@@ -668,4 +668,3 @@ module_exit(adp5588_exit); | |||
668 | MODULE_LICENSE("GPL"); | 668 | MODULE_LICENSE("GPL"); |
669 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); | 669 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
670 | MODULE_DESCRIPTION("ADP5588/87 Keypad driver"); | 670 | MODULE_DESCRIPTION("ADP5588/87 Keypad driver"); |
671 | MODULE_ALIAS("platform:adp5588-keys"); | ||
diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c index b09c7d127219..ab860511f016 100644 --- a/drivers/input/misc/cm109.c +++ b/drivers/input/misc/cm109.c | |||
@@ -475,7 +475,7 @@ static void cm109_toggle_buzzer_sync(struct cm109_dev *dev, int on) | |||
475 | le16_to_cpu(dev->ctl_req->wIndex), | 475 | le16_to_cpu(dev->ctl_req->wIndex), |
476 | dev->ctl_data, | 476 | dev->ctl_data, |
477 | USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); | 477 | USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); |
478 | if (error && error != EINTR) | 478 | if (error < 0 && error != -EINTR) |
479 | err("%s: usb_control_msg() failed %d", __func__, error); | 479 | err("%s: usb_control_msg() failed %d", __func__, error); |
480 | } | 480 | } |
481 | 481 | ||
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index da280189ef07..5ec617e28f7e 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
@@ -67,6 +67,10 @@ | |||
67 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245 | 67 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245 |
68 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246 | 68 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246 |
69 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247 | 69 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247 |
70 | /* MacbookAir4,1 (unibody, July 2011) */ | ||
71 | #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI 0x0249 | ||
72 | #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO 0x024a | ||
73 | #define USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS 0x024b | ||
70 | /* MacbookAir4,2 (unibody, July 2011) */ | 74 | /* MacbookAir4,2 (unibody, July 2011) */ |
71 | #define USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI 0x024c | 75 | #define USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI 0x024c |
72 | #define USB_DEVICE_ID_APPLE_WELLSPRING6_ISO 0x024d | 76 | #define USB_DEVICE_ID_APPLE_WELLSPRING6_ISO 0x024d |
@@ -112,6 +116,10 @@ static const struct usb_device_id bcm5974_table[] = { | |||
112 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI), | 116 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI), |
113 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ISO), | 117 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ISO), |
114 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_JIS), | 118 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_JIS), |
119 | /* MacbookAir4,1 */ | ||
120 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI), | ||
121 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO), | ||
122 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS), | ||
115 | /* MacbookAir4,2 */ | 123 | /* MacbookAir4,2 */ |
116 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI), | 124 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI), |
117 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6_ISO), | 125 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6_ISO), |
@@ -334,6 +342,18 @@ static const struct bcm5974_config bcm5974_config_table[] = { | |||
334 | { DIM_X, DIM_X / SN_COORD, -4750, 5280 }, | 342 | { DIM_X, DIM_X / SN_COORD, -4750, 5280 }, |
335 | { DIM_Y, DIM_Y / SN_COORD, -150, 6730 } | 343 | { DIM_Y, DIM_Y / SN_COORD, -150, 6730 } |
336 | }, | 344 | }, |
345 | { | ||
346 | USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI, | ||
347 | USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO, | ||
348 | USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS, | ||
349 | HAS_INTEGRATED_BUTTON, | ||
350 | 0x84, sizeof(struct bt_data), | ||
351 | 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS, | ||
352 | { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 }, | ||
353 | { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 }, | ||
354 | { DIM_X, DIM_X / SN_COORD, -4620, 5140 }, | ||
355 | { DIM_Y, DIM_Y / SN_COORD, -150, 6600 } | ||
356 | }, | ||
337 | {} | 357 | {} |
338 | }; | 358 | }; |
339 | 359 | ||
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index a205055a4c51..1c1b7b43cf92 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -251,13 +251,6 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi | |||
251 | get_unaligned_le16(&report[i + 3]); | 251 | get_unaligned_le16(&report[i + 3]); |
252 | i += 4; | 252 | i += 4; |
253 | } | 253 | } |
254 | } else if (usage == WCM_DIGITIZER) { | ||
255 | /* max pressure isn't reported | ||
256 | features->pressure_max = (unsigned short) | ||
257 | (report[i+4] << 8 | report[i + 3]); | ||
258 | */ | ||
259 | features->pressure_max = 255; | ||
260 | i += 4; | ||
261 | } | 254 | } |
262 | break; | 255 | break; |
263 | 256 | ||
@@ -313,13 +306,6 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi | |||
313 | pen = 1; | 306 | pen = 1; |
314 | i++; | 307 | i++; |
315 | break; | 308 | break; |
316 | |||
317 | case HID_USAGE_UNDEFINED: | ||
318 | if (usage == WCM_DESKTOP && finger) /* capacity */ | ||
319 | features->pressure_max = | ||
320 | get_unaligned_le16(&report[i + 3]); | ||
321 | i += 4; | ||
322 | break; | ||
323 | } | 309 | } |
324 | break; | 310 | break; |
325 | 311 | ||
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 7fefd93596ea..da0d8761e778 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -800,25 +800,26 @@ static int wacom_bpt_touch(struct wacom_wac *wacom) | |||
800 | int i; | 800 | int i; |
801 | 801 | ||
802 | for (i = 0; i < 2; i++) { | 802 | for (i = 0; i < 2; i++) { |
803 | int p = data[9 * i + 2]; | 803 | int offset = (data[1] & 0x80) ? (8 * i) : (9 * i); |
804 | bool touch = p && !wacom->shared->stylus_in_proximity; | 804 | bool touch = data[offset + 3] & 0x80; |
805 | 805 | ||
806 | input_mt_slot(input, i); | ||
807 | input_mt_report_slot_state(input, MT_TOOL_FINGER, touch); | ||
808 | /* | 806 | /* |
809 | * Touch events need to be disabled while stylus is | 807 | * Touch events need to be disabled while stylus is |
810 | * in proximity because user's hand is resting on touchpad | 808 | * in proximity because user's hand is resting on touchpad |
811 | * and sending unwanted events. User expects tablet buttons | 809 | * and sending unwanted events. User expects tablet buttons |
812 | * to continue working though. | 810 | * to continue working though. |
813 | */ | 811 | */ |
812 | touch = touch && !wacom->shared->stylus_in_proximity; | ||
813 | |||
814 | input_mt_slot(input, i); | ||
815 | input_mt_report_slot_state(input, MT_TOOL_FINGER, touch); | ||
814 | if (touch) { | 816 | if (touch) { |
815 | int x = get_unaligned_be16(&data[9 * i + 3]) & 0x7ff; | 817 | int x = get_unaligned_be16(&data[offset + 3]) & 0x7ff; |
816 | int y = get_unaligned_be16(&data[9 * i + 5]) & 0x7ff; | 818 | int y = get_unaligned_be16(&data[offset + 5]) & 0x7ff; |
817 | if (features->quirks & WACOM_QUIRK_BBTOUCH_LOWRES) { | 819 | if (features->quirks & WACOM_QUIRK_BBTOUCH_LOWRES) { |
818 | x <<= 5; | 820 | x <<= 5; |
819 | y <<= 5; | 821 | y <<= 5; |
820 | } | 822 | } |
821 | input_report_abs(input, ABS_MT_PRESSURE, p); | ||
822 | input_report_abs(input, ABS_MT_POSITION_X, x); | 823 | input_report_abs(input, ABS_MT_POSITION_X, x); |
823 | input_report_abs(input, ABS_MT_POSITION_Y, y); | 824 | input_report_abs(input, ABS_MT_POSITION_Y, y); |
824 | } | 825 | } |
@@ -1062,10 +1063,11 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1062 | features->x_fuzz, 0); | 1063 | features->x_fuzz, 0); |
1063 | input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, | 1064 | input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, |
1064 | features->y_fuzz, 0); | 1065 | features->y_fuzz, 0); |
1065 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, | ||
1066 | features->pressure_fuzz, 0); | ||
1067 | 1066 | ||
1068 | if (features->device_type == BTN_TOOL_PEN) { | 1067 | if (features->device_type == BTN_TOOL_PEN) { |
1068 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, | ||
1069 | features->pressure_fuzz, 0); | ||
1070 | |||
1069 | /* penabled devices have fixed resolution for each model */ | 1071 | /* penabled devices have fixed resolution for each model */ |
1070 | input_abs_set_res(input_dev, ABS_X, features->x_resolution); | 1072 | input_abs_set_res(input_dev, ABS_X, features->x_resolution); |
1071 | input_abs_set_res(input_dev, ABS_Y, features->y_resolution); | 1073 | input_abs_set_res(input_dev, ABS_Y, features->y_resolution); |
@@ -1104,6 +1106,8 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1104 | __set_bit(BTN_TOOL_MOUSE, input_dev->keybit); | 1106 | __set_bit(BTN_TOOL_MOUSE, input_dev->keybit); |
1105 | __set_bit(BTN_STYLUS, input_dev->keybit); | 1107 | __set_bit(BTN_STYLUS, input_dev->keybit); |
1106 | __set_bit(BTN_STYLUS2, input_dev->keybit); | 1108 | __set_bit(BTN_STYLUS2, input_dev->keybit); |
1109 | |||
1110 | __set_bit(INPUT_PROP_POINTER, input_dev->propbit); | ||
1107 | break; | 1111 | break; |
1108 | 1112 | ||
1109 | case WACOM_21UX2: | 1113 | case WACOM_21UX2: |
@@ -1126,12 +1130,12 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1126 | for (i = 0; i < 8; i++) | 1130 | for (i = 0; i < 8; i++) |
1127 | __set_bit(BTN_0 + i, input_dev->keybit); | 1131 | __set_bit(BTN_0 + i, input_dev->keybit); |
1128 | 1132 | ||
1129 | if (wacom_wac->features.type != WACOM_21UX2) { | 1133 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); |
1130 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); | 1134 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); |
1131 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); | ||
1132 | } | ||
1133 | |||
1134 | input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); | 1135 | input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); |
1136 | |||
1137 | __set_bit(INPUT_PROP_DIRECT, input_dev->propbit); | ||
1138 | |||
1135 | wacom_setup_cintiq(wacom_wac); | 1139 | wacom_setup_cintiq(wacom_wac); |
1136 | break; | 1140 | break; |
1137 | 1141 | ||
@@ -1156,6 +1160,8 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1156 | /* fall through */ | 1160 | /* fall through */ |
1157 | 1161 | ||
1158 | case INTUOS: | 1162 | case INTUOS: |
1163 | __set_bit(INPUT_PROP_POINTER, input_dev->propbit); | ||
1164 | |||
1159 | wacom_setup_intuos(wacom_wac); | 1165 | wacom_setup_intuos(wacom_wac); |
1160 | break; | 1166 | break; |
1161 | 1167 | ||
@@ -1171,6 +1177,8 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1171 | 1177 | ||
1172 | input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); | 1178 | input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); |
1173 | wacom_setup_intuos(wacom_wac); | 1179 | wacom_setup_intuos(wacom_wac); |
1180 | |||
1181 | __set_bit(INPUT_PROP_POINTER, input_dev->propbit); | ||
1174 | break; | 1182 | break; |
1175 | 1183 | ||
1176 | case TABLETPC2FG: | 1184 | case TABLETPC2FG: |
@@ -1189,26 +1197,40 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1189 | case TABLETPC: | 1197 | case TABLETPC: |
1190 | __clear_bit(ABS_MISC, input_dev->absbit); | 1198 | __clear_bit(ABS_MISC, input_dev->absbit); |
1191 | 1199 | ||
1200 | __set_bit(INPUT_PROP_DIRECT, input_dev->propbit); | ||
1201 | |||
1192 | if (features->device_type != BTN_TOOL_PEN) | 1202 | if (features->device_type != BTN_TOOL_PEN) |
1193 | break; /* no need to process stylus stuff */ | 1203 | break; /* no need to process stylus stuff */ |
1194 | 1204 | ||
1195 | /* fall through */ | 1205 | /* fall through */ |
1196 | 1206 | ||
1197 | case PL: | 1207 | case PL: |
1198 | case PTU: | ||
1199 | case DTU: | 1208 | case DTU: |
1200 | __set_bit(BTN_TOOL_PEN, input_dev->keybit); | 1209 | __set_bit(BTN_TOOL_PEN, input_dev->keybit); |
1210 | __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); | ||
1201 | __set_bit(BTN_STYLUS, input_dev->keybit); | 1211 | __set_bit(BTN_STYLUS, input_dev->keybit); |
1202 | __set_bit(BTN_STYLUS2, input_dev->keybit); | 1212 | __set_bit(BTN_STYLUS2, input_dev->keybit); |
1213 | |||
1214 | __set_bit(INPUT_PROP_DIRECT, input_dev->propbit); | ||
1215 | break; | ||
1216 | |||
1217 | case PTU: | ||
1218 | __set_bit(BTN_STYLUS2, input_dev->keybit); | ||
1203 | /* fall through */ | 1219 | /* fall through */ |
1204 | 1220 | ||
1205 | case PENPARTNER: | 1221 | case PENPARTNER: |
1222 | __set_bit(BTN_TOOL_PEN, input_dev->keybit); | ||
1206 | __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); | 1223 | __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); |
1224 | __set_bit(BTN_STYLUS, input_dev->keybit); | ||
1225 | |||
1226 | __set_bit(INPUT_PROP_POINTER, input_dev->propbit); | ||
1207 | break; | 1227 | break; |
1208 | 1228 | ||
1209 | case BAMBOO_PT: | 1229 | case BAMBOO_PT: |
1210 | __clear_bit(ABS_MISC, input_dev->absbit); | 1230 | __clear_bit(ABS_MISC, input_dev->absbit); |
1211 | 1231 | ||
1232 | __set_bit(INPUT_PROP_POINTER, input_dev->propbit); | ||
1233 | |||
1212 | if (features->device_type == BTN_TOOL_DOUBLETAP) { | 1234 | if (features->device_type == BTN_TOOL_DOUBLETAP) { |
1213 | __set_bit(BTN_LEFT, input_dev->keybit); | 1235 | __set_bit(BTN_LEFT, input_dev->keybit); |
1214 | __set_bit(BTN_FORWARD, input_dev->keybit); | 1236 | __set_bit(BTN_FORWARD, input_dev->keybit); |
diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c index 1f42d91f755b..1569a3934ab2 100644 --- a/drivers/input/touchscreen/wacom_w8001.c +++ b/drivers/input/touchscreen/wacom_w8001.c | |||
@@ -397,6 +397,8 @@ static int w8001_setup(struct w8001 *w8001) | |||
397 | dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); | 397 | dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
398 | strlcat(w8001->name, "Wacom Serial", sizeof(w8001->name)); | 398 | strlcat(w8001->name, "Wacom Serial", sizeof(w8001->name)); |
399 | 399 | ||
400 | __set_bit(INPUT_PROP_DIRECT, dev->propbit); | ||
401 | |||
400 | /* penabled? */ | 402 | /* penabled? */ |
401 | error = w8001_command(w8001, W8001_CMD_QUERY, true); | 403 | error = w8001_command(w8001, W8001_CMD_QUERY, true); |
402 | if (!error) { | 404 | if (!error) { |