diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-02-02 17:10:39 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-02-02 17:10:39 -0500 |
commit | e1a0bdd8022317e98650e70850de73eccfcde5ad (patch) | |
tree | 462f63307118b95c8cbacee6954e4d09ee85b8d1 /drivers/hid | |
parent | 8127f4e883666c9960cfa89cffd36313748f8bab (diff) | |
parent | 1a45dcfe2525e9432cb4aba461d4994fc2befe42 (diff) |
Merge branch 'master' into upstream
Conflicts:
drivers/hid/hid-ids.h
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-apple.c | 7 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 4 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 6 | ||||
-rw-r--r-- | drivers/hid/hid-lg.h | 2 | ||||
-rw-r--r-- | drivers/hid/hid-samsung.c | 25 | ||||
-rw-r--r-- | drivers/hid/hid-wacom.c | 4 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 8 |
7 files changed, 44 insertions, 12 deletions
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index 1433cbbaa99f..78286b184ace 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c | |||
@@ -438,6 +438,13 @@ static const struct hid_device_id apple_devices[] = { | |||
438 | .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, | 438 | .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, |
439 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS), | 439 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS), |
440 | .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, | 440 | .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, |
441 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI), | ||
442 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, | ||
443 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO), | ||
444 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | ||
445 | APPLE_ISO_KEYBOARD }, | ||
446 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS), | ||
447 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, | ||
441 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY), | 448 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY), |
442 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, | 449 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
443 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY), | 450 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY), |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 1bbd96d4efe4..2dd9b28e39c4 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1287,6 +1287,9 @@ static const struct hid_device_id hid_blacklist[] = { | |||
1287 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) }, | 1287 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) }, |
1288 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) }, | 1288 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) }, |
1289 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) }, | 1289 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) }, |
1290 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) }, | ||
1291 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) }, | ||
1292 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) }, | ||
1290 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, | 1293 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, |
1291 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, | 1294 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, |
1292 | { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, | 1295 | { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, |
@@ -1559,6 +1562,7 @@ static const struct hid_device_id hid_ignore_list[] = { | |||
1559 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE) }, | 1562 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE) }, |
1560 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, | 1563 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, |
1561 | { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, | 1564 | { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, |
1565 | { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, | ||
1562 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0001) }, | 1566 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0001) }, |
1563 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0002) }, | 1567 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0002) }, |
1564 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0003) }, | 1568 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0003) }, |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index bb5f4fa479ad..39ff98a5bd61 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -91,6 +91,9 @@ | |||
91 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236 | 91 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236 |
92 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237 | 92 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237 |
93 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238 | 93 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238 |
94 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239 | ||
95 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a | ||
96 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b | ||
94 | #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a | 97 | #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a |
95 | #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b | 98 | #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b |
96 | #define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241 | 99 | #define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241 |
@@ -172,6 +175,9 @@ | |||
172 | #define USB_VENDOR_ID_ETURBOTOUCH 0x22b9 | 175 | #define USB_VENDOR_ID_ETURBOTOUCH 0x22b9 |
173 | #define USB_DEVICE_ID_ETURBOTOUCH 0x0006 | 176 | #define USB_DEVICE_ID_ETURBOTOUCH 0x0006 |
174 | 177 | ||
178 | #define USB_VENDOR_ID_ETT 0x0664 | ||
179 | #define USB_DEVICE_ID_TC5UH 0x0309 | ||
180 | |||
175 | #define USB_VENDOR_ID_EZKEY 0x0518 | 181 | #define USB_VENDOR_ID_EZKEY 0x0518 |
176 | #define USB_DEVICE_ID_BTC_8193 0x0002 | 182 | #define USB_DEVICE_ID_BTC_8193 0x0002 |
177 | 183 | ||
diff --git a/drivers/hid/hid-lg.h b/drivers/hid/hid-lg.h index 8069c3e8b64a..ce2ac8672624 100644 --- a/drivers/hid/hid-lg.h +++ b/drivers/hid/hid-lg.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef __HID_LG_H | 1 | #ifndef __HID_LG_H |
2 | #define __HID_LG_H | 2 | #define __HID_LG_H |
3 | 3 | ||
4 | #include <linux/autoconf.h> | ||
5 | |||
6 | #ifdef CONFIG_LOGITECH_FF | 4 | #ifdef CONFIG_LOGITECH_FF |
7 | int lgff_init(struct hid_device *hdev); | 5 | int lgff_init(struct hid_device *hdev); |
8 | #else | 6 | #else |
diff --git a/drivers/hid/hid-samsung.c b/drivers/hid/hid-samsung.c index 5b222eed0692..510dd1340597 100644 --- a/drivers/hid/hid-samsung.c +++ b/drivers/hid/hid-samsung.c | |||
@@ -39,7 +39,17 @@ | |||
39 | * | 39 | * |
40 | * 3. 135 byte report descriptor | 40 | * 3. 135 byte report descriptor |
41 | * Report #4 has an array field with logical range 0..17 instead of 1..14. | 41 | * Report #4 has an array field with logical range 0..17 instead of 1..14. |
42 | * | ||
43 | * 4. 171 byte report descriptor | ||
44 | * Report #3 has an array field with logical range 0..1 instead of 1..3. | ||
42 | */ | 45 | */ |
46 | static inline void samsung_dev_trace(struct hid_device *hdev, | ||
47 | unsigned int rsize) | ||
48 | { | ||
49 | dev_info(&hdev->dev, "fixing up Samsung IrDA %d byte report " | ||
50 | "descriptor\n", rsize); | ||
51 | } | ||
52 | |||
43 | static void samsung_report_fixup(struct hid_device *hdev, __u8 *rdesc, | 53 | static void samsung_report_fixup(struct hid_device *hdev, __u8 *rdesc, |
44 | unsigned int rsize) | 54 | unsigned int rsize) |
45 | { | 55 | { |
@@ -47,8 +57,7 @@ static void samsung_report_fixup(struct hid_device *hdev, __u8 *rdesc, | |||
47 | rdesc[177] == 0x75 && rdesc[178] == 0x30 && | 57 | rdesc[177] == 0x75 && rdesc[178] == 0x30 && |
48 | rdesc[179] == 0x95 && rdesc[180] == 0x01 && | 58 | rdesc[179] == 0x95 && rdesc[180] == 0x01 && |
49 | rdesc[182] == 0x40) { | 59 | rdesc[182] == 0x40) { |
50 | dev_info(&hdev->dev, "fixing up Samsung IrDA %d byte report " | 60 | samsung_dev_trace(hdev, 184); |
51 | "descriptor\n", 184); | ||
52 | rdesc[176] = 0xff; | 61 | rdesc[176] = 0xff; |
53 | rdesc[178] = 0x08; | 62 | rdesc[178] = 0x08; |
54 | rdesc[180] = 0x06; | 63 | rdesc[180] = 0x06; |
@@ -56,17 +65,21 @@ static void samsung_report_fixup(struct hid_device *hdev, __u8 *rdesc, | |||
56 | } else | 65 | } else |
57 | if (rsize == 203 && rdesc[192] == 0x15 && rdesc[193] == 0x0 && | 66 | if (rsize == 203 && rdesc[192] == 0x15 && rdesc[193] == 0x0 && |
58 | rdesc[194] == 0x25 && rdesc[195] == 0x12) { | 67 | rdesc[194] == 0x25 && rdesc[195] == 0x12) { |
59 | dev_info(&hdev->dev, "fixing up Samsung IrDA %d byte report " | 68 | samsung_dev_trace(hdev, 203); |
60 | "descriptor\n", 203); | ||
61 | rdesc[193] = 0x1; | 69 | rdesc[193] = 0x1; |
62 | rdesc[195] = 0xf; | 70 | rdesc[195] = 0xf; |
63 | } else | 71 | } else |
64 | if (rsize == 135 && rdesc[124] == 0x15 && rdesc[125] == 0x0 && | 72 | if (rsize == 135 && rdesc[124] == 0x15 && rdesc[125] == 0x0 && |
65 | rdesc[126] == 0x25 && rdesc[127] == 0x11) { | 73 | rdesc[126] == 0x25 && rdesc[127] == 0x11) { |
66 | dev_info(&hdev->dev, "fixing up Samsung IrDA %d byte report " | 74 | samsung_dev_trace(hdev, 135); |
67 | "descriptor\n", 135); | ||
68 | rdesc[125] = 0x1; | 75 | rdesc[125] = 0x1; |
69 | rdesc[127] = 0xe; | 76 | rdesc[127] = 0xe; |
77 | } else | ||
78 | if (rsize == 171 && rdesc[160] == 0x15 && rdesc[161] == 0x0 && | ||
79 | rdesc[162] == 0x25 && rdesc[163] == 0x01) { | ||
80 | samsung_dev_trace(hdev, 171); | ||
81 | rdesc[161] = 0x1; | ||
82 | rdesc[163] = 0x3; | ||
70 | } | 83 | } |
71 | } | 84 | } |
72 | 85 | ||
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index 747542172242..12dcda529201 100644 --- a/drivers/hid/hid-wacom.c +++ b/drivers/hid/hid-wacom.c | |||
@@ -142,6 +142,7 @@ static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report, | |||
142 | wdata->butstate = rw; | 142 | wdata->butstate = rw; |
143 | input_report_key(input, BTN_0, rw & 0x02); | 143 | input_report_key(input, BTN_0, rw & 0x02); |
144 | input_report_key(input, BTN_1, rw & 0x01); | 144 | input_report_key(input, BTN_1, rw & 0x01); |
145 | input_report_key(input, BTN_TOOL_FINGER, 0xf0); | ||
145 | input_event(input, EV_MSC, MSC_SERIAL, 0xf0); | 146 | input_event(input, EV_MSC, MSC_SERIAL, 0xf0); |
146 | input_sync(input); | 147 | input_sync(input); |
147 | } | 148 | } |
@@ -196,6 +197,9 @@ static int wacom_probe(struct hid_device *hdev, | |||
196 | /* Pad */ | 197 | /* Pad */ |
197 | input->evbit[0] |= BIT(EV_MSC); | 198 | input->evbit[0] |= BIT(EV_MSC); |
198 | input->mscbit[0] |= BIT(MSC_SERIAL); | 199 | input->mscbit[0] |= BIT(MSC_SERIAL); |
200 | set_bit(BTN_0, input->keybit); | ||
201 | set_bit(BTN_1, input->keybit); | ||
202 | set_bit(BTN_TOOL_FINGER, input->keybit); | ||
199 | 203 | ||
200 | /* Distance, rubber and mouse */ | 204 | /* Distance, rubber and mouse */ |
201 | input->absbit[0] |= BIT(ABS_DISTANCE); | 205 | input->absbit[0] |= BIT(ABS_DISTANCE); |
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index eb7e0019891f..54060741d45b 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -1253,10 +1253,9 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message) | |||
1253 | { | 1253 | { |
1254 | struct hid_device *hid = usb_get_intfdata(intf); | 1254 | struct hid_device *hid = usb_get_intfdata(intf); |
1255 | struct usbhid_device *usbhid = hid->driver_data; | 1255 | struct usbhid_device *usbhid = hid->driver_data; |
1256 | struct usb_device *udev = interface_to_usbdev(intf); | ||
1257 | int status; | 1256 | int status; |
1258 | 1257 | ||
1259 | if (udev->auto_pm) { | 1258 | if (message.event & PM_EVENT_AUTO) { |
1260 | spin_lock_irq(&usbhid->lock); /* Sync with error handler */ | 1259 | spin_lock_irq(&usbhid->lock); /* Sync with error handler */ |
1261 | if (!test_bit(HID_RESET_PENDING, &usbhid->iofl) | 1260 | if (!test_bit(HID_RESET_PENDING, &usbhid->iofl) |
1262 | && !test_bit(HID_CLEAR_HALT, &usbhid->iofl) | 1261 | && !test_bit(HID_CLEAR_HALT, &usbhid->iofl) |
@@ -1281,7 +1280,7 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message) | |||
1281 | return -EIO; | 1280 | return -EIO; |
1282 | } | 1281 | } |
1283 | 1282 | ||
1284 | if (!ignoreled && udev->auto_pm) { | 1283 | if (!ignoreled && (message.event & PM_EVENT_AUTO)) { |
1285 | spin_lock_irq(&usbhid->lock); | 1284 | spin_lock_irq(&usbhid->lock); |
1286 | if (test_bit(HID_LED_ON, &usbhid->iofl)) { | 1285 | if (test_bit(HID_LED_ON, &usbhid->iofl)) { |
1287 | spin_unlock_irq(&usbhid->lock); | 1286 | spin_unlock_irq(&usbhid->lock); |
@@ -1294,7 +1293,8 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message) | |||
1294 | hid_cancel_delayed_stuff(usbhid); | 1293 | hid_cancel_delayed_stuff(usbhid); |
1295 | hid_cease_io(usbhid); | 1294 | hid_cease_io(usbhid); |
1296 | 1295 | ||
1297 | if (udev->auto_pm && test_bit(HID_KEYS_PRESSED, &usbhid->iofl)) { | 1296 | if ((message.event & PM_EVENT_AUTO) && |
1297 | test_bit(HID_KEYS_PRESSED, &usbhid->iofl)) { | ||
1298 | /* lost race against keypresses */ | 1298 | /* lost race against keypresses */ |
1299 | status = hid_start_in(hid); | 1299 | status = hid_start_in(hid); |
1300 | if (status < 0) | 1300 | if (status < 0) |