Add compat option to hid code to allow loading of all modules on
systems which don't allow autoloading because of old userspace.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Currently, the handling of mapping between hid and input for devices
that don't conform to HUT 1.12 specification is very messy -- no per-device
handling, no blacklists, conditions on idVendor and idProduct placed
all over the code.
This patch moves all the device-specific input mapping to a separate
file, and introduces a blacklist-style handling for non-standard
device-specific mappings.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
hidraw is an interface that is going to obsolete hiddev one
day.
Many userland applications are using libusb instead of using
kernel-provided hiddev interface. This is caused by various
reasons - the HID parser in kernel doesn't handle all the
HID hardware on the planet properly, some devices might require
its own specific quirks/drivers, etc.
hiddev interface tries to do its best to parse all the received
reports properly, and presents only parsed usages into userspace.
This is however often not enough, and that's the reason why
many userland applications just don't use hiddev at all, and
rather use libusb to read raw USB events and process them on
their own.
Another drawback of hiddev is that it is USB-specific.
hidraw interface provides userspace readers with really raw HID
reports, no matter what the low-level transport layer is (USB/BT),
and gives the userland applications all the freedom to process
the HID reports in a way they wish to.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Separate usbhid code into dedicated drivers/hid/usbhid directory as
discussed previously with Greg, so that it eases maintaineance process.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
CONFIG_INPUT_DEBUG is non-existent option, so remove anything depending
on it.
Also, as we have new CONFIG_HID_DEBUG, this should be used on places
where ifdef DEBUG was used before.
Suggested by Adrian Bunk.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
hid-debug.h contains a lot of code, and should not therefore
be a header.
This patch moves the code to generic hid layer as .c source, and
introduces CONFIG_HID_DEBUG to conditionally compile it, instead
of playing with #define DEBUG and including hid-debug.h.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This modifies Makefiles and Kconfigs to properly reflect the creation of
generic HID layer.
It also removes the dependency of BROKEN, which was introduced by the
first patch in series (see the comment). Also updates credits.
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>