Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d07a15b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: Suppress hidinput for Samsung IR control
  HID: remove 60x GTCO devices from blacklist
  HID: export headers properly
  HID: WiseGroup 866 Dual Joypad needs output reports quirk
  HID: ThrustMaster FF driver is no longer experimental
  HID: Logitech diNovo Mini pad support
  HID: fix race between open() and disconnect() in usbhid
  HID: make hid_input_field and usbhid_modify_dquirk static
  HID: pass numbered reports properly to hidraw
  HID: fix misplaced rdesc quirk
  HID: force feedback driver for Logitech Rumblepad 2
  HID: move wait from hid to usbhid
  HID: make function from dbg_hid
  HID: fix sparse warnings
  HID: only dump report traffic with debug level 2
  HID: patch to add NOGET for DMI/Acomdata
  HID: Sunplus Wireless Desktop needs report descriptor fixup
  HID: quirk for MS Wireless Desktop Receiver (model 1028)
  HID: fixup fullspeed interval on highspeed Afatech DVB-T IR kbd
  HID: fix build failure in hiddev_ioctl with gcc 3.2
parents 62429f43 efa0f16b
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -44,8 +44,8 @@

#ifdef CONFIG_HID_DEBUG
int hid_debug = 0;
module_param_named(debug, hid_debug, bool, 0600);
MODULE_PARM_DESC(debug, "Turn HID debugging mode on and off");
module_param_named(debug, hid_debug, int, 0600);
MODULE_PARM_DESC(debug, "HID debugging (0=off, 1=probing info, 2=continuous data dumping)");
EXPORT_SYMBOL_GPL(hid_debug);
#endif

@@ -97,7 +97,7 @@ static struct hid_field *hid_register_field(struct hid_report *report, unsigned
	field->index = report->maxfield++;
	report->field[field->index] = field;
	field->usage = (struct hid_usage *)(field + 1);
	field->value = (unsigned *)(field->usage + usages);
	field->value = (s32 *)(field->usage + usages);
	field->report = report;

	return field;
@@ -830,7 +830,8 @@ static void hid_process_event(struct hid_device *hid, struct hid_field *field, s
 * reporting to the layer).
 */

void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt)
static void hid_input_field(struct hid_device *hid, struct hid_field *field,
			    __u8 *data, int interrupt)
{
	unsigned n;
	unsigned count = field->report_count;
@@ -876,7 +877,6 @@ void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data
exit:
	kfree(value);
}
EXPORT_SYMBOL_GPL(hid_input_field);

/*
 * Output the field into the report.
@@ -988,8 +988,13 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i

	if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event)
		hid->hiddev_report_event(hid, report);
	if (hid->claimed & HID_CLAIMED_HIDRAW)
	if (hid->claimed & HID_CLAIMED_HIDRAW) {
		/* numbered reports need to be passed with the report num */
		if (report_enum->numbered)
			hidraw_report_event(hid, data - 1, size + 1);
		else
			hidraw_report_event(hid, data, size);
	}

	for (n = 0; n < report->maxfield; n++)
		hid_input_field(hid, report->field[n], data, interrupt);
+1 −1
Original line number Diff line number Diff line
@@ -498,7 +498,7 @@ void hid_dump_device(struct hid_device *device) {
EXPORT_SYMBOL_GPL(hid_dump_device);

void hid_dump_input(struct hid_usage *usage, __s32 value) {
	if (!hid_debug)
	if (hid_debug < 2)
		return;

	printk(KERN_DEBUG "hid-debug: input ");
+22 −2
Original line number Diff line number Diff line
@@ -276,6 +276,21 @@ static int quirk_btc_8193(struct hid_usage *usage, struct input_dev *input,
	return 1;
}

static int quirk_sunplus_wdesktop(struct hid_usage *usage, struct input_dev *input,
			      unsigned long **bit, int *max)
{
	if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER)
		return 0;

	switch (usage->hid & HID_USAGE) {
		case 0x2003: map_key_clear(KEY_ZOOMIN);		break;
		case 0x2103: map_key_clear(KEY_ZOOMOUT);	break;
		default:
			return 0;
	}
	return 1;
}

#define VENDOR_ID_BELKIN			0x1020
#define DEVICE_ID_BELKIN_WIRELESS_KEYBOARD	0x0006

@@ -306,6 +321,9 @@ static int quirk_btc_8193(struct hid_usage *usage, struct input_dev *input,
#define VENDOR_ID_PETALYNX			0x18b1
#define DEVICE_ID_PETALYNX_MAXTER_REMOTE	0x0037

#define VENDOR_ID_SUNPLUS			0x04fc
#define DEVICE_ID_SUNPLUS_WDESKTOP		0x05d8

static const struct hid_input_blacklist {
	__u16 idVendor;
	__u16 idProduct;
@@ -333,7 +351,9 @@ static const struct hid_input_blacklist {

	{ VENDOR_ID_PETALYNX, DEVICE_ID_PETALYNX_MAXTER_REMOTE, quirk_petalynx_remote },

	{ 0, 0, 0 }
	{ VENDOR_ID_SUNPLUS, DEVICE_ID_SUNPLUS_WDESKTOP, quirk_sunplus_wdesktop },

	{ 0, 0, NULL }
};

int hidinput_mapping_quirks(struct hid_usage *usage, 
+10 −2
Original line number Diff line number Diff line
@@ -71,6 +71,14 @@ config LOGITECH_FF
	  Note: if you say N here, this device will still be supported, but without
	  force feedback.

config LOGIRUMBLEPAD2_FF
	bool "Logitech Rumblepad 2 support"
	depends on HID_FF
	select INPUT_FF_MEMLESS if USB_HID
	help
	  Say Y here if you want to enable force feedback support for Logitech
	  Rumblepad 2 devices.

config PANTHERLORD_FF
	bool "PantherLord/GreenAsia based device support"
	depends on HID_FF
@@ -80,8 +88,8 @@ config PANTHERLORD_FF
	  or adapter and want to enable force feedback support for it.

config THRUSTMASTER_FF
	bool "ThrustMaster devices support (EXPERIMENTAL)"
	depends on HID_FF && EXPERIMENTAL
	bool "ThrustMaster devices support"
	depends on HID_FF
	select INPUT_FF_MEMLESS if USB_HID
	help
	  Say Y here if you have a THRUSTMASTER FireStore Dual Power 2 or
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@ endif
ifeq ($(CONFIG_LOGITECH_FF),y)
	usbhid-objs	+= hid-lgff.o
endif
ifeq ($(CONFIG_LOGIRUMBLEPAD2_FF),y)
	usbhid-objs	+= hid-lg2ff.o
endif
ifeq ($(CONFIG_PANTHERLORD_FF),y)
	usbhid-objs	+= hid-plff.o
endif
Loading