Daniel Walker | 1 Jul 18:23

[PATCH] hid: gyration remote support

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

Defines are now alphabetical.

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..e6a937a 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;
(Continue reading)

Daniel Walker | 1 Jul 18:24

[PATCH] hid: gyration sleep button quirk

This patch is based on one provided by Jiri Kosina to handle the sleep
button. I just added some cleanup and integrated it into my series.

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

diff --git a/drivers/hid/hid-input-quirks.c b/drivers/hid/hid-input-quirks.c
index e6a937a..16feea0 100644
--- a/drivers/hid/hid-input-quirks.c
+++ b/drivers/hid/hid-input-quirks.c
@@ -466,6 +466,18 @@ int hidinput_event_quirks(struct hid_device *hid, struct hid_field *field, struc
 		input_event(input, usage->type, REL_WHEEL, -value);
 		return 1;
 	}
+
+	/* Gyration MCE remote "Sleep" key */
+	if (hid->vendor == VENDOR_ID_GYRATION &&
+	    hid->product == DEVICE_ID_GYRATION_REMOTE &&
+	    (usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK &&
+	    (usage->hid & 0xff) == 0x82) {
+		input_event(input, usage->type, usage->code, 1);
+		input_sync(input);
+		input_event(input, usage->type, usage->code, 0);
+		input_sync(input);
+		return 1;
+	}
 	return 0;
 }
(Continue reading)

Jiri Kosina | 3 Jul 18:17

Re: [PATCH] hid: gyration sleep button quirk

On Tue, 1 Jul 2008, Daniel Walker wrote:

> This patch is based on one provided by Jiri Kosina to handle the sleep
> button. I just added some cleanup and integrated it into my series.
>
> Signed-off-by: Daniel Walker <dwalker <at> mvista.com>
> ---
> drivers/hid/hid-input-quirks.c |   12 ++++++++++++
> 1 files changed, 12 insertions(+), 0 deletions(-)
[ ... ]

On Tue, 1 Jul 2008, Daniel Walker wrote:

> This adds in a quirk for the additional un-mapped buttons on the
> gyration MCE remote.
>
> Defines are now alphabetical.
>
> Signed-off-by: Daniel Walker <dwalker <at> mvista.com>

Hi Daniel,

thanks a lot. Could you please fold these two patches into one, and send 
it to me? I will then merge it into my tree.
I don't think there is a reason to have this split into two separate 
patches.

Thanks,

--

-- 
(Continue reading)

Daniel Walker | 3 Jul 18:33

Re: [PATCH] hid: gyration sleep button quirk


On Thu, 2008-07-03 at 18:17 +0200, Jiri Kosina wrote:

> Hi Daniel,
> 
> thanks a lot. Could you please fold these two patches into one, and send 
> it to me? I will then merge it into my tree.
> I don't think there is a reason to have this split into two separate 
> patches.

They're split due to authorship .. The second patch is largely your
work ..

Daniel

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jiri Kosina | 4 Jul 14:46

Re: [PATCH] hid: gyration sleep button quirk

On Thu, 3 Jul 2008, Daniel Walker wrote:

>> thanks a lot. Could you please fold these two patches into one, and 
>> send it to me? I will then merge it into my tree. I don't think there 
>> is a reason to have this split into two separate patches.
> They're split due to authorship .. The second patch is largely your
> work ..

Applied to my tree, thanks a lot.

--

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane