aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-05-03 09:25:35 -0400
committerJiri Kosina <jkosina@suse.cz>2010-05-03 09:25:35 -0400
commitd6d53cbc6b10d28646fb6184d1069f336ec76dc4 (patch)
tree1c844b3ce8bd430becbbb74875898b08d9f89bb5 /drivers/hid
parent0b5adf92ec793c665b0de63ac146d190a921c391 (diff)
parent6a740aa4f47b9f29bad5292cf51f008f3edad9b1 (diff)
Merge branch 'hid-suspend' into picolcd
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-3m-pct.c1
-rw-r--r--drivers/hid/hid-a4tech.c1
-rw-r--r--drivers/hid/hid-apple.c1
-rw-r--r--drivers/hid/hid-debug.c1
-rw-r--r--drivers/hid/hid-drff.c1
-rw-r--r--drivers/hid/hid-gaff.c1
-rw-r--r--drivers/hid/hid-gyration.c5
-rw-r--r--drivers/hid/hid-lg2ff.c1
-rw-r--r--drivers/hid/hid-magicmouse.c1
-rw-r--r--drivers/hid/hid-mosart.c1
-rw-r--r--drivers/hid/hid-ntrig.c1
-rw-r--r--drivers/hid/hid-pl.c1
-rw-r--r--drivers/hid/hid-quanta.c1
-rw-r--r--drivers/hid/hid-sjoy.c1
-rw-r--r--drivers/hid/hid-sony.c1
-rw-r--r--drivers/hid/hid-stantum.c1
-rw-r--r--drivers/hid/hid-tmff.c1
-rw-r--r--drivers/hid/hid-wacom.c1
-rw-r--r--drivers/hid/hid-zpff.c1
-rw-r--r--drivers/hid/hidraw.c1
-rw-r--r--drivers/hid/usbhid/hid-core.c24
-rw-r--r--drivers/hid/usbhid/hid-pidff.c1
-rw-r--r--drivers/hid/usbhid/hid-quirks.c2
23 files changed, 49 insertions, 2 deletions
diff --git a/drivers/hid/hid-3m-pct.c b/drivers/hid/hid-3m-pct.c
index 2370aefc86b2..c31e0be8ccea 100644
--- a/drivers/hid/hid-3m-pct.c
+++ b/drivers/hid/hid-3m-pct.c
@@ -15,6 +15,7 @@
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/hid.h> 16#include <linux/hid.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/slab.h>
18#include <linux/usb.h> 19#include <linux/usb.h>
19 20
20MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>"); 21MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>");
diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c
index df474c699fb8..3a2b223c1da4 100644
--- a/drivers/hid/hid-a4tech.c
+++ b/drivers/hid/hid-a4tech.c
@@ -20,6 +20,7 @@
20#include <linux/input.h> 20#include <linux/input.h>
21#include <linux/hid.h> 21#include <linux/hid.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/slab.h>
23 24
24#include "hid-ids.h" 25#include "hid-ids.h"
25 26
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 78286b184ace..bba05d0a8980 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -19,6 +19,7 @@
19#include <linux/device.h> 19#include <linux/device.h>
20#include <linux/hid.h> 20#include <linux/hid.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/slab.h>
22#include <linux/usb.h> 23#include <linux/usb.h>
23 24
24#include "hid-ids.h" 25#include "hid-ids.h"
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index 0c4e75573186..56f314fbd4f9 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -29,6 +29,7 @@
29#include <linux/debugfs.h> 29#include <linux/debugfs.h>
30#include <linux/seq_file.h> 30#include <linux/seq_file.h>
31#include <linux/sched.h> 31#include <linux/sched.h>
32#include <linux/slab.h>
32#include <linux/uaccess.h> 33#include <linux/uaccess.h>
33#include <linux/poll.h> 34#include <linux/poll.h>
34 35
diff --git a/drivers/hid/hid-drff.c b/drivers/hid/hid-drff.c
index a239d20ad7a5..968b04f9b796 100644
--- a/drivers/hid/hid-drff.c
+++ b/drivers/hid/hid-drff.c
@@ -28,6 +28,7 @@
28 */ 28 */
29 29
30#include <linux/input.h> 30#include <linux/input.h>
31#include <linux/slab.h>
31#include <linux/usb.h> 32#include <linux/usb.h>
32#include <linux/hid.h> 33#include <linux/hid.h>
33 34
diff --git a/drivers/hid/hid-gaff.c b/drivers/hid/hid-gaff.c
index 8a11ccddaf2e..88dfcf49a5d7 100644
--- a/drivers/hid/hid-gaff.c
+++ b/drivers/hid/hid-gaff.c
@@ -28,6 +28,7 @@
28 */ 28 */
29 29
30#include <linux/input.h> 30#include <linux/input.h>
31#include <linux/slab.h>
31#include <linux/usb.h> 32#include <linux/usb.h>
32#include <linux/hid.h> 33#include <linux/hid.h>
33#include "hid-ids.h" 34#include "hid-ids.h"
diff --git a/drivers/hid/hid-gyration.c b/drivers/hid/hid-gyration.c
index cab13e8c7d29..62416e6baeca 100644
--- a/drivers/hid/hid-gyration.c
+++ b/drivers/hid/hid-gyration.c
@@ -53,10 +53,13 @@ static int gyration_input_mapping(struct hid_device *hdev, struct hid_input *hi,
53static int gyration_event(struct hid_device *hdev, struct hid_field *field, 53static int gyration_event(struct hid_device *hdev, struct hid_field *field,
54 struct hid_usage *usage, __s32 value) 54 struct hid_usage *usage, __s32 value)
55{ 55{
56 struct input_dev *input = field->hidinput->input; 56
57 if (!(hdev->claimed & HID_CLAIMED_INPUT) || !field->hidinput)
58 return 0;
57 59
58 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK && 60 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK &&
59 (usage->hid & 0xff) == 0x82) { 61 (usage->hid & 0xff) == 0x82) {
62 struct input_dev *input = field->hidinput->input;
60 input_event(input, usage->type, usage->code, 1); 63 input_event(input, usage->type, usage->code, 1);
61 input_sync(input); 64 input_sync(input);
62 input_event(input, usage->type, usage->code, 0); 65 input_event(input, usage->type, usage->code, 0);
diff --git a/drivers/hid/hid-lg2ff.c b/drivers/hid/hid-lg2ff.c
index 4e6dc6e26523..d888f1e6794f 100644
--- a/drivers/hid/hid-lg2ff.c
+++ b/drivers/hid/hid-lg2ff.c
@@ -22,6 +22,7 @@
22 22
23 23
24#include <linux/input.h> 24#include <linux/input.h>
25#include <linux/slab.h>
25#include <linux/usb.h> 26#include <linux/usb.h>
26#include <linux/hid.h> 27#include <linux/hid.h>
27 28
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index c174b64c3810..0d471fc2ab82 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -14,6 +14,7 @@
14#include <linux/device.h> 14#include <linux/device.h>
15#include <linux/hid.h> 15#include <linux/hid.h>
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/slab.h>
17#include <linux/usb.h> 18#include <linux/usb.h>
18 19
19#include "hid-ids.h" 20#include "hid-ids.h"
diff --git a/drivers/hid/hid-mosart.c b/drivers/hid/hid-mosart.c
index c8718168fe42..e91437c18906 100644
--- a/drivers/hid/hid-mosart.c
+++ b/drivers/hid/hid-mosart.c
@@ -16,6 +16,7 @@
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/hid.h> 17#include <linux/hid.h>
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/slab.h>
19#include <linux/usb.h> 20#include <linux/usb.h>
20#include "usbhid/usbhid.h" 21#include "usbhid/usbhid.h"
21 22
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index edcc0c4247bb..9b24fc510712 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -16,6 +16,7 @@
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/hid.h> 17#include <linux/hid.h>
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/slab.h>
19 20
20#include "hid-ids.h" 21#include "hid-ids.h"
21 22
diff --git a/drivers/hid/hid-pl.c b/drivers/hid/hid-pl.c
index c6d7dbc935b1..9f41e2bd8483 100644
--- a/drivers/hid/hid-pl.c
+++ b/drivers/hid/hid-pl.c
@@ -39,6 +39,7 @@
39#define debug(format, arg...) pr_debug("hid-plff: " format "\n" , ## arg) 39#define debug(format, arg...) pr_debug("hid-plff: " format "\n" , ## arg)
40 40
41#include <linux/input.h> 41#include <linux/input.h>
42#include <linux/slab.h>
42#include <linux/usb.h> 43#include <linux/usb.h>
43#include <linux/hid.h> 44#include <linux/hid.h>
44 45
diff --git a/drivers/hid/hid-quanta.c b/drivers/hid/hid-quanta.c
index 01dd51c4986c..54d3db50605b 100644
--- a/drivers/hid/hid-quanta.c
+++ b/drivers/hid/hid-quanta.c
@@ -15,6 +15,7 @@
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/hid.h> 16#include <linux/hid.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/slab.h>
18 19
19MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>"); 20MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>");
20MODULE_DESCRIPTION("Quanta dual-touch panel"); 21MODULE_DESCRIPTION("Quanta dual-touch panel");
diff --git a/drivers/hid/hid-sjoy.c b/drivers/hid/hid-sjoy.c
index 203c438b016f..e10a7687ebf2 100644
--- a/drivers/hid/hid-sjoy.c
+++ b/drivers/hid/hid-sjoy.c
@@ -27,6 +27,7 @@
27/* #define DEBUG */ 27/* #define DEBUG */
28 28
29#include <linux/input.h> 29#include <linux/input.h>
30#include <linux/slab.h>
30#include <linux/usb.h> 31#include <linux/usb.h>
31#include <linux/hid.h> 32#include <linux/hid.h>
32#include "hid-ids.h" 33#include "hid-ids.h"
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 9bf00d77d92b..7502a4b2fa86 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -19,6 +19,7 @@
19#include <linux/device.h> 19#include <linux/device.h>
20#include <linux/hid.h> 20#include <linux/hid.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/slab.h>
22#include <linux/usb.h> 23#include <linux/usb.h>
23 24
24#include "hid-ids.h" 25#include "hid-ids.h"
diff --git a/drivers/hid/hid-stantum.c b/drivers/hid/hid-stantum.c
index 2e592a06654e..90df886c5e04 100644
--- a/drivers/hid/hid-stantum.c
+++ b/drivers/hid/hid-stantum.c
@@ -15,6 +15,7 @@
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/hid.h> 16#include <linux/hid.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/slab.h>
18 19
19MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>"); 20MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>");
20MODULE_DESCRIPTION("Stantum HID multitouch panels"); 21MODULE_DESCRIPTION("Stantum HID multitouch panels");
diff --git a/drivers/hid/hid-tmff.c b/drivers/hid/hid-tmff.c
index c32f32c84ac8..15434c814793 100644
--- a/drivers/hid/hid-tmff.c
+++ b/drivers/hid/hid-tmff.c
@@ -29,6 +29,7 @@
29 29
30#include <linux/hid.h> 30#include <linux/hid.h>
31#include <linux/input.h> 31#include <linux/input.h>
32#include <linux/slab.h>
32#include <linux/usb.h> 33#include <linux/usb.h>
33 34
34#include "hid-ids.h" 35#include "hid-ids.h"
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index 8d3b46f5d149..f7700cf49721 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -21,6 +21,7 @@
21#include <linux/device.h> 21#include <linux/device.h>
22#include <linux/hid.h> 22#include <linux/hid.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/slab.h>
24 25
25#include "hid-ids.h" 26#include "hid-ids.h"
26 27
diff --git a/drivers/hid/hid-zpff.c b/drivers/hid/hid-zpff.c
index a79f0d78c6be..b7acceabba80 100644
--- a/drivers/hid/hid-zpff.c
+++ b/drivers/hid/hid-zpff.c
@@ -23,6 +23,7 @@
23 23
24#include <linux/hid.h> 24#include <linux/hid.h>
25#include <linux/input.h> 25#include <linux/input.h>
26#include <linux/slab.h>
26#include <linux/usb.h> 27#include <linux/usb.h>
27 28
28#include "hid-ids.h" 29#include "hid-ids.h"
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index d04476700b7b..6eadf1a9b3cc 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -28,6 +28,7 @@
28#include <linux/poll.h> 28#include <linux/poll.h>
29#include <linux/device.h> 29#include <linux/device.h>
30#include <linux/major.h> 30#include <linux/major.h>
31#include <linux/slab.h>
31#include <linux/hid.h> 32#include <linux/hid.h>
32#include <linux/mutex.h> 33#include <linux/mutex.h>
33#include <linux/sched.h> 34#include <linux/sched.h>
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 3e7909b0f129..17eb3ec3fbb8 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -1291,6 +1291,11 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message)
1291 { 1291 {
1292 set_bit(HID_REPORTED_IDLE, &usbhid->iofl); 1292 set_bit(HID_REPORTED_IDLE, &usbhid->iofl);
1293 spin_unlock_irq(&usbhid->lock); 1293 spin_unlock_irq(&usbhid->lock);
1294 if (hid->driver && hid->driver->suspend) {
1295 status = hid->driver->suspend(hid, message);
1296 if (status < 0)
1297 return status;
1298 }
1294 } else { 1299 } else {
1295 usbhid_mark_busy(usbhid); 1300 usbhid_mark_busy(usbhid);
1296 spin_unlock_irq(&usbhid->lock); 1301 spin_unlock_irq(&usbhid->lock);
@@ -1298,6 +1303,11 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message)
1298 } 1303 }
1299 1304
1300 } else { 1305 } else {
1306 if (hid->driver && hid->driver->suspend) {
1307 status = hid->driver->suspend(hid, message);
1308 if (status < 0)
1309 return status;
1310 }
1301 spin_lock_irq(&usbhid->lock); 1311 spin_lock_irq(&usbhid->lock);
1302 set_bit(HID_REPORTED_IDLE, &usbhid->iofl); 1312 set_bit(HID_REPORTED_IDLE, &usbhid->iofl);
1303 spin_unlock_irq(&usbhid->lock); 1313 spin_unlock_irq(&usbhid->lock);
@@ -1352,6 +1362,11 @@ static int hid_resume(struct usb_interface *intf)
1352 hid_io_error(hid); 1362 hid_io_error(hid);
1353 usbhid_restart_queues(usbhid); 1363 usbhid_restart_queues(usbhid);
1354 1364
1365 if (status >= 0 && hid->driver && hid->driver->resume) {
1366 int ret = hid->driver->resume(hid);
1367 if (ret < 0)
1368 status = ret;
1369 }
1355 dev_dbg(&intf->dev, "resume status %d\n", status); 1370 dev_dbg(&intf->dev, "resume status %d\n", status);
1356 return 0; 1371 return 0;
1357} 1372}
@@ -1360,9 +1375,16 @@ static int hid_reset_resume(struct usb_interface *intf)
1360{ 1375{
1361 struct hid_device *hid = usb_get_intfdata(intf); 1376 struct hid_device *hid = usb_get_intfdata(intf);
1362 struct usbhid_device *usbhid = hid->driver_data; 1377 struct usbhid_device *usbhid = hid->driver_data;
1378 int status;
1363 1379
1364 clear_bit(HID_REPORTED_IDLE, &usbhid->iofl); 1380 clear_bit(HID_REPORTED_IDLE, &usbhid->iofl);
1365 return hid_post_reset(intf); 1381 status = hid_post_reset(intf);
1382 if (status >= 0 && hid->driver && hid->driver->reset_resume) {
1383 int ret = hid->driver->reset_resume(hid);
1384 if (ret < 0)
1385 status = ret;
1386 }
1387 return status;
1366} 1388}
1367 1389
1368#endif /* CONFIG_PM */ 1390#endif /* CONFIG_PM */
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index e565dbe91d97..ef381d79cfa8 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -25,6 +25,7 @@
25#define debug(format, arg...) pr_debug("hid-pidff: " format "\n" , ## arg) 25#define debug(format, arg...) pr_debug("hid-pidff: " format "\n" , ## arg)
26 26
27#include <linux/input.h> 27#include <linux/input.h>
28#include <linux/slab.h>
28#include <linux/usb.h> 29#include <linux/usb.h>
29 30
30#include <linux/hid.h> 31#include <linux/hid.h>
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 928943c7ce9a..1152f9b5fd44 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -16,6 +16,7 @@
16 */ 16 */
17 17
18#include <linux/hid.h> 18#include <linux/hid.h>
19#include <linux/slab.h>
19 20
20#include "../hid-ids.h" 21#include "../hid-ids.h"
21 22
@@ -60,6 +61,7 @@ static const struct hid_blacklist {
60 { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, 61 { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
61 { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, 62 { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },
62 { USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS, HID_QUIRK_NOGET }, 63 { USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS, HID_QUIRK_NOGET },
64 { USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN, HID_QUIRK_NOGET },
63 { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, 65 { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET },
64 { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET }, 66 { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET },
65 { USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209, HID_QUIRK_MULTI_INPUT }, 67 { USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209, HID_QUIRK_MULTI_INPUT },