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

Commit 3b8006e5 authored by Jiri Slaby's avatar Jiri Slaby Committed by Jiri Kosina
Browse files

HID: move monterey quirks



Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 1e762532
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -154,6 +154,13 @@ config HID_MICROSOFT
	Support for some Microsoft devices which breaks less or more
	HID specification.

config HID_MONTEREY
	tristate "Monterey"
	default m
	depends on USB_HID
	---help---
	Support for Monterey Genius KB29E.

config HID_PETALYNX
	tristate "Petalynx"
	default m
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o
obj-$(CONFIG_HID_EZKEY)		+= hid-ezkey.o
obj-$(CONFIG_HID_LOGITECH)	+= hid-logitech.o
obj-$(CONFIG_HID_MICROSOFT)	+= hid-microsoft.o
obj-$(CONFIG_HID_MONTEREY)	+= hid-monterey.o
obj-$(CONFIG_HID_PETALYNX)	+= hid-petalynx.o
obj-$(CONFIG_HID_SUNPLUS)	+= hid-sunplus.o

+1 −0
Original line number Diff line number Diff line
@@ -1191,6 +1191,7 @@ static const struct hid_device_id hid_blacklist[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_LK6K) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_USB) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) },

+3 −0
Original line number Diff line number Diff line
@@ -31,6 +31,9 @@ static int __init hid_dummy_init(void)
#ifdef CONFIG_HID_MICROSOFT_MODULE
	HID_COMPAT_CALL_DRIVER(microsoft);
#endif
#ifdef CONFIG_HID_MONTEREY_MODULE
	HID_COMPAT_CALL_DRIVER(monterey);
#endif
#ifdef CONFIG_HID_PETALYNX_MODULE
	HID_COMPAT_CALL_DRIVER(petalynx);
#endif
+0 −23
Original line number Diff line number Diff line
@@ -42,30 +42,9 @@ static int quirk_gyration_remote(struct hid_usage *usage,
	return 1;
}

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

	switch (usage->hid & HID_USAGE) {
		case 0x156: map_key_clear(KEY_WORDPROCESSOR);	break;
		case 0x157: map_key_clear(KEY_SPREADSHEET);	break;
		case 0x158: map_key_clear(KEY_PRESENTATION);	break;
		case 0x15c: map_key_clear(KEY_STOP);		break;

		default:
			return 0;
	}
	return 1;
}

#define VENDOR_ID_GYRATION			0x0c16
#define DEVICE_ID_GYRATION_REMOTE		0x0002

#define VENDOR_ID_MONTEREY			0x0566
#define DEVICE_ID_GENIUS_KB29E			0x3004

static const struct hid_input_blacklist {
	__u16 idVendor;
	__u16 idProduct;
@@ -74,8 +53,6 @@ static const struct hid_input_blacklist {
} hid_input_blacklist[] = {
	{ VENDOR_ID_GYRATION, DEVICE_ID_GYRATION_REMOTE, quirk_gyration_remote },

	{ VENDOR_ID_MONTEREY, DEVICE_ID_GENIUS_KB29E, quirk_cherry_genius_29e },

	{ 0, 0, NULL }
};

Loading