Daniel Walker | 30 Jun 21:41

[PATCH 1/2] hid: gyration remote support

This adds in a quirk for the additional un-mapped buttons on the
gyration MCE remote.

Signed-off-by: Daniel Walker <dwalker <at> mvista.com>
---
 drivers/hid/hid-input-quirks.c |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-input-quirks.c b/drivers/hid/hid-input-quirks.c
index 4c2052c..4c39f7c 100644
--- a/drivers/hid/hid-input-quirks.c
+++ b/drivers/hid/hid-input-quirks.c
@@ -89,6 +89,29 @@ static int quirk_logitech_ultrax_remote(struct hid_usage *usage, struct input_de
 	return 1;
 }

+static int quirk_gyration_remote(struct hid_usage *usage, struct input_dev *input,
+			      unsigned long **bit, int *max)
+{
+	if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR)
+		return 0;
+
+	set_bit(EV_REP, input->evbit);
+	switch(usage->hid & HID_USAGE) {
+		/* Reported on Gyration MCE Remote */
+		case 0x00d: map_key_clear(KEY_HOME);		break;
+		case 0x024: map_key_clear(KEY_DVD);		break;
+		case 0x025: map_key_clear(KEY_PVR);		break;
+		case 0x046: map_key_clear(KEY_MEDIA);		break;
+		case 0x047: map_key_clear(KEY_MP3);		break;
(Continue reading)

Jiri Kosina | 1 Jul 09:55
Favicon

Re: [PATCH 1/2] hid: gyration remote support

On Mon, 30 Jun 2008, Daniel Walker wrote:

> This adds in a quirk for the additional un-mapped buttons on the
> gyration MCE remote.
>
> Signed-off-by: Daniel Walker <dwalker <at> mvista.com>
> ---
> drivers/hid/hid-input-quirks.c |   28 ++++++++++++++++++++++++++++
> 1 files changed, 28 insertions(+), 0 deletions(-)
[ ... ]
> @@ -324,6 +347,9 @@ static int quirk_sunplus_wdesktop(struct hid_usage *usage, struct input_dev *inp
> #define VENDOR_ID_SUNPLUS			0x04fc
> #define DEVICE_ID_SUNPLUS_WDESKTOP		0x05d8
>
> +#define VENDOR_ID_GYRATION			0x0c16
> +#define DEVICE_ID_GYRATION_REMOTE		0x0002

Hi daniel,

thanks a lot for the patch. Could you please leave the order of these 
defines alphabetically sorted?

> static const struct hid_input_blacklist {
> 	__u16 idVendor;
> 	__u16 idProduct;
> @@ -353,6 +379,8 @@ static const struct hid_input_blacklist {
>
> 	{ VENDOR_ID_SUNPLUS, DEVICE_ID_SUNPLUS_WDESKTOP, quirk_sunplus_wdesktop },
>
> +	{ VENDOR_ID_GYRATION, DEVICE_ID_GYRATION_REMOTE, quirk_gyration_remote },
(Continue reading)


Gmane