[PATCH] Generic HID layer - code split

The "big main" split of USB HID code into generic HID code and
USB-transport specific HID handling.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Jiri Kosina
2006-12-08 18:40:44 +01:00
committed by Greg Kroah-Hartman
parent 64bb67b170
commit dde5845a52
12 changed files with 1896 additions and 1802 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -32,7 +32,7 @@
#undef DEBUG
#include <linux/usb.h>
#include "hid.h"
#include <linux/hid.h>
/*
* This table contains pointers to initializers. To add support for new
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -29,7 +29,7 @@
#include <linux/input.h>
#include <linux/usb.h>
#include "hid.h"
#include <linux/hid.h>
struct device_type {
u16 idVendor;
+3 -1
View File
@@ -28,7 +28,9 @@
#include <linux/input.h>
#include <linux/usb.h>
#include "hid.h"
#include <linux/hid.h>
#include "usbhid.h"
#define PID_EFFECTS_MAX 64
+1 -1
View File
@@ -32,7 +32,7 @@
#undef DEBUG
#include <linux/usb.h>
#include "hid.h"
#include <linux/hid.h>
/* Usages for thrustmaster devices I know about */
#define THRUSTMASTER_USAGE_RUMBLE_LR (HID_UP_GENDESK | 0xbb)
+1 -1
View File
@@ -27,7 +27,7 @@
#include <linux/input.h>
#include <linux/usb.h>
#include "hid.h"
#include <linux/hid.h>
struct zpff_device {
struct hid_report *report;
+2 -1
View File
@@ -32,8 +32,9 @@
#include <linux/smp_lock.h>
#include <linux/input.h>
#include <linux/usb.h>
#include "hid.h"
#include <linux/hid.h>
#include <linux/hiddev.h>
#include "usbhid.h"
#ifdef CONFIG_USB_DYNAMIC_MINORS
#define HIDDEV_MINOR_BASE 0
+10 -10
View File
@@ -6,6 +6,7 @@
*
* Copyright (c) 1999 Andreas Gal
* Copyright (c) 2000-2001 Vojtech Pavlik
* Copyright (c) 2006 Jiri Kosina
*/
/*
@@ -33,6 +34,7 @@
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <linux/input.h>
/*
* USB HID (Human Interface Device) interface class code
@@ -260,7 +262,7 @@ struct hid_item {
#define HID_QUIRK_POWERBOOK_HAS_FN 0x00001000
#define HID_QUIRK_POWERBOOK_FN_ON 0x00002000
#define HID_QUIRK_INVERT_HWHEEL 0x00004000
#define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000
#define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000
#define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000
/*
@@ -496,9 +498,7 @@ struct hid_descriptor {
#define resolv_event(a,b) do { } while (0)
#endif
#endif
#ifdef CONFIG_USB_HIDINPUT
#ifdef CONFIG_HID
/* Applications from HID Usage Tables 4/8/99 Version 1.1 */
/* We ignore a few input applications that are not widely used */
#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001))
@@ -514,13 +514,12 @@ static inline int hidinput_connect(struct hid_device *hid) { return -ENODEV; }
static inline void hidinput_disconnect(struct hid_device *hid) { }
#endif
int hid_open(struct hid_device *);
void hid_close(struct hid_device *);
int hid_set_field(struct hid_field *, unsigned, __s32);
void hid_submit_report(struct hid_device *, struct hid_report *, unsigned char dir);
void hid_init_reports(struct hid_device *hid);
int hid_wait_io(struct hid_device* hid);
int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field);
void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt);
void hid_output_report(struct hid_report *report, __u8 *data);
void hid_free_device(struct hid_device *device);
struct hid_device *hid_parse_report(__u8 *start, unsigned size);
#ifdef CONFIG_HID_FF
int hid_ff_init(struct hid_device *hid);
@@ -537,4 +536,5 @@ static inline int hid_pidff_init(struct hid_device *hid) { return -ENODEV; }
#else
static inline int hid_ff_init(struct hid_device *hid) { return -1; }
#endif
#endif