Commit dde5845a authored by Jiri Kosina's avatar Jiri Kosina Committed by Greg Kroah-Hartman

[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: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 64bb67b1
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -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
......
This diff is collapsed.
......@@ -29,7 +29,7 @@
#include <linux/input.h>
#include <linux/usb.h>
#include "hid.h"
#include <linux/hid.h>
struct device_type {
u16 idVendor;
......
......@@ -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
......
......@@ -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)
......
......@@ -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;
......
......@@ -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
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment