aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2007-06-18 07:30:11 -0400
committerJiri Kosina <jkosina@suse.cz>2007-07-09 08:13:33 -0400
commit92d9e6e607eb7f8f1d2a43935f45cf300cf6fdf8 (patch)
tree52a583569ad4262ea354941e604f464770ee7756 /drivers/hid/hid-input.c
parent5fce620c0c7caa9e8d9588e8dcc66c52c456851a (diff)
HID: support for Petalynx Maxter remote control
Petalynx Maxter remote control [1] 0x18b1/0x0037 emits 0xfa and 0xfc from consumer page (reserved in HUT 1.12) for back and more keys. It also emits a few usages from LOGIVENDOR page, which need adding. Also, this device has broken report descriptor - the reported maximum is too low - it doesn't contain the range for 'back' and 'more' keys, so we need to bump it up before the report descriptor is being parsed. Besides all this, it also requires NOGET quirk. This patch does so. [1] http://www.elmak.pl/index.php?option=com_phpshop&page=shop.browse&category_id=14&ext=opis&lang=en Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 6cb884638fda..1b8b33341408 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -566,6 +566,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
566 case 0x0e5: map_key_clear(KEY_BASSBOOST); break; 566 case 0x0e5: map_key_clear(KEY_BASSBOOST); break;
567 case 0x0e9: map_key_clear(KEY_VOLUMEUP); break; 567 case 0x0e9: map_key_clear(KEY_VOLUMEUP); break;
568 case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break; 568 case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break;
569
570 /* reserved in HUT 1.12. Reported on Petalynx remote */
571 case 0x0f6: map_key_clear(KEY_NEXT); break;
572 case 0x0fa: map_key_clear(KEY_BACK); break;
573
569 case 0x183: map_key_clear(KEY_CONFIG); break; 574 case 0x183: map_key_clear(KEY_CONFIG); break;
570 case 0x184: map_key_clear(KEY_WORDPROCESSOR); break; 575 case 0x184: map_key_clear(KEY_WORDPROCESSOR); break;
571 case 0x185: map_key_clear(KEY_EDITOR); break; 576 case 0x185: map_key_clear(KEY_EDITOR); break;
@@ -727,10 +732,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
727 } 732 }
728 break; 733 break;
729 734
730 case HID_UP_LOGIVENDOR: /* Reported on Logitech Ultra X Media Remote */ 735 case HID_UP_LOGIVENDOR:
731
732 set_bit(EV_REP, input->evbit); 736 set_bit(EV_REP, input->evbit);
733 switch(usage->hid & HID_USAGE) { 737 switch(usage->hid & HID_USAGE) {
738 /* Reported on Logitech Ultra X Media Remote */
734 case 0x004: map_key_clear(KEY_AGAIN); break; 739 case 0x004: map_key_clear(KEY_AGAIN); break;
735 case 0x00d: map_key_clear(KEY_HOME); break; 740 case 0x00d: map_key_clear(KEY_HOME); break;
736 case 0x024: map_key_clear(KEY_SHUFFLE); break; 741 case 0x024: map_key_clear(KEY_SHUFFLE); break;
@@ -748,6 +753,14 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
748 case 0x04d: map_key_clear(KEY_SUBTITLE); break; 753 case 0x04d: map_key_clear(KEY_SUBTITLE); break;
749 case 0x051: map_key_clear(KEY_RED); break; 754 case 0x051: map_key_clear(KEY_RED); break;
750 case 0x052: map_key_clear(KEY_CLOSE); break; 755 case 0x052: map_key_clear(KEY_CLOSE); break;
756
757 /* Reported on Petalynx Maxter remote */
758 case 0x05a: map_key_clear(KEY_TEXT); break;
759 case 0x05b: map_key_clear(KEY_RED); break;
760 case 0x05c: map_key_clear(KEY_GREEN); break;
761 case 0x05d: map_key_clear(KEY_YELLOW); break;
762 case 0x05e: map_key_clear(KEY_BLUE); break;
763
751 default: goto ignore; 764 default: goto ignore;
752 } 765 }
753 break; 766 break;