Thread (8 messages) 8 messages, 2 authors, 2011-05-24

Re: [PATCH] hid: assorted usage updates from hut 1.12

From: Jarod Wilson <hidden>
Date: 2011-04-19 19:12:58

Jarod Wilson wrote:
quoted hunk ↗ jump to hunk
I've got a Tivo Slide bluetooth remote/dongle, which uses a fair number
of hid usages that aren't currently mapped in hid-input.c. I'd initially
written additions to hid-input.c with just this device in mind,
including some bits that were specific to the device. This go around,
I'm looking at adding/correcting as many generic HID usages from the HID
Usage Tables, version 1.12, as I can -- which also serves to enable all
but four of the buttons on the Tivo Slide remote[*].

Outside of fixing the obviously incorrect mapping of 0xc 0x45 from
KEY_RADIO to KEY_RIGHT, and making use of the new KEY_IMAGES (just added
in 2.6.39-rc4) for AL Image Browser instead of KEY_MEDIA, these are
purely additions, and thus should have no negative impact on any already
functional HID devices. Most of the added mappings seemed to be
perfectly logical to me, but there were a few that were mapped on more
of an "I think this makes the most sense" basis.

[*] I'll handle the last four tivo buttons via an hid-tivo.c follow-up.

CC: Dmitry Torokhov<dmitry.torokhov@gmail.com>
CC: Jiri Kosina<redacted>
Signed-off-by: Jarod Wilson<redacted>
---
Nb: This is being submitted for 2.6.40, but I'd certainly have no
objections to it going into 2.6.39. :)

  drivers/hid/hid-input.c |   60 ++++++++++++++++++++++++++++++++++++++++------
  1 files changed, 52 insertions(+), 8 deletions(-)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 7f552bf..84d50e7 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
...
quoted hunk ↗ jump to hunk
@@ -540,6 +578,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
  		case 0x18e: map_key_clear(KEY_CALENDAR);	break;
  		case 0x191: map_key_clear(KEY_FINANCE);		break;
  		case 0x192: map_key_clear(KEY_CALC);		break;
+		case 0x192: map_key_clear(KEY_PLAYER);		break;
Sigh. I thought I'd re-tested after my last round of additions, but 
obviously not, since this will fail to build, because KEY_PLAYER should 
be case 0x193, rather than a duplicate... Will resubmit once I'm 100% 
positive things actually build and function. :\



-- 
Jarod Wilson
jarod@redhat.com

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help