HID: move gyration quirks
[linux-2.6/mini2440.git] / drivers / hid / hid-input-quirks.c
blob980e7456e260131d429426d747f7131233422ef6
1 /*
2 * HID-input usage mapping quirks
4 * This is used to handle HID-input mappings for devices violating
5 * HUT 1.12 specification.
7 * Copyright (c) 2007-2008 Jiri Kosina
8 */
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the Free
13 * Software Foundation; either version 2 of the License
16 #include <linux/input.h>
17 #include <linux/hid.h>
19 static const struct hid_input_blacklist {
20 __u16 idVendor;
21 __u16 idProduct;
22 int (*quirk)(struct hid_usage *, struct hid_input *, unsigned long **,
23 int *);
24 } hid_input_blacklist[] = {
25 { 0, 0, NULL }
28 int hidinput_mapping_quirks(struct hid_usage *usage,
29 struct hid_input *hi, unsigned long **bit, int *max)
31 struct hid_device *device = input_get_drvdata(hi->input);
32 int i = 0;
34 while (hid_input_blacklist[i].quirk) {
35 if (hid_input_blacklist[i].idVendor == device->vendor &&
36 hid_input_blacklist[i].idProduct == device->product)
37 return hid_input_blacklist[i].quirk(usage, hi, bit,
38 max);
39 i++;
41 return 0;
44 int hidinput_event_quirks(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value)
46 return 0;