linux/drivers/hid
Nikolai Kondrashov 883e0e3662 HID: hid-input: allow array fields out of range
Allow array field values out of range as per HID 1.11 specification,
section 6.2.25:

	Rather than returning a single bit for each button in the group, an
	array returns an index in each field that corresponds to the pressed
	button (like keyboard scan codes). An out-of range value in and array
	field is considered no controls asserted.

Apparently, "and" above is a typo and should be "an".

This fixes at least Waltop tablet pen clicks - otherwise BTN_TOUCH is never
released.

The relevant part of Waltop tablet report descriptors is this:

	0x09, 0x42,         /*          Usage (Tip Switch),         */
	0x09, 0x44,         /*          Usage (Barrel Switch),      */
	0x09, 0x46,         /*          Usage (Tablet Pick),        */
	0x15, 0x01,         /*          Logical Minimum (1),        */
	0x25, 0x03,         /*          Logical Maximum (3),        */
	0x75, 0x04,         /*          Report Size (4),            */
	0x95, 0x01,         /*          Report Count (1),           */
	0x80,               /*          Input,                      */

This is a regression fix for commit b4b583d ("HID: be more strict when
ignoring out-of-range fields").

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-03-05 10:28:58 +01:00
..
usbhid
Kconfig
Makefile
hid-a4tech.c
hid-apple.c
hid-axff.c
hid-belkin.c
hid-cherry.c
hid-chicony.c
hid-core.c
hid-cypress.c
hid-debug.c
hid-dr.c
hid-elecom.c
hid-emsff.c
hid-ezkey.c
hid-gaff.c
hid-gyration.c
hid-holtekff.c
hid-hyperv.c
hid-ids.h
hid-input.c
hid-kensington.c
hid-keytouch.c
hid-kye.c
hid-lcpower.c
hid-lg.c
hid-lg.h
hid-lg2ff.c
hid-lg3ff.c
hid-lg4ff.c
hid-lgff.c
hid-logitech-dj.c
hid-logitech-dj.h
hid-magicmouse.c
hid-microsoft.c
hid-monterey.c
hid-multitouch.c
hid-ntrig.c
hid-ortek.c
hid-petalynx.c
hid-picolcd.c
hid-pl.c
hid-primax.c
hid-prodikeys.c
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c
hid-roccat-isku.h
hid-roccat-kone.c
hid-roccat-kone.h
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-kovaplus.c
hid-roccat-kovaplus.h
hid-roccat-pyra.c
hid-roccat-pyra.h
hid-roccat.c
hid-samsung.c
hid-sjoy.c
hid-sony.c
hid-speedlink.c
hid-sunplus.c
hid-tmff.c
hid-topseed.c
hid-twinhan.c
hid-uclogic.c
hid-wacom.c
hid-waltop.c
hid-wiimote-core.c
hid-wiimote-debug.c
hid-wiimote-ext.c
hid-wiimote.h
hid-zpff.c
hid-zydacron.c
hidraw.c