aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2009-11-24 12:22:20 -0500
committerJiri Kosina <jkosina@suse.cz>2009-11-25 10:20:52 -0500
commit66d61bec697e99476c2fb095f9a6ead3be2e1c21 (patch)
treef310279f00e1f71dc7537b0d3d71494f67dbd99a /drivers/hid
parent1168df7e1cbfa4b45ba2bfd982ff535df50c273c (diff)
HID: make Media key on Logitech DiNovo Mini work
Put proper mapping of Media key on Logitech DiNovo Mini. According to the specification from Logitech webpage, this key is intended to launch a Media center. Reported-by: Stefan Plattner <Stefan.Plattner@ilogs.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-lg.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index 0f870a3243ed..4a489785647a 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -89,6 +89,22 @@ static int lg_ultrax_remote_mapping(struct hid_input *hi,
89 return 1; 89 return 1;
90} 90}
91 91
92static int lg_dinovo_mapping(struct hid_input *hi, struct hid_usage *usage,
93 unsigned long **bit, int *max)
94{
95 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR)
96 return 0;
97
98 switch (usage->hid & HID_USAGE) {
99
100 case 0x00d: lg_map_key_clear(KEY_MEDIA); break;
101 default:
102 return 0;
103
104 }
105 return 1;
106}
107
92static int lg_wireless_mapping(struct hid_input *hi, struct hid_usage *usage, 108static int lg_wireless_mapping(struct hid_input *hi, struct hid_usage *usage,
93 unsigned long **bit, int *max) 109 unsigned long **bit, int *max)
94{ 110{
@@ -164,6 +180,10 @@ static int lg_input_mapping(struct hid_device *hdev, struct hid_input *hi,
164 lg_ultrax_remote_mapping(hi, usage, bit, max)) 180 lg_ultrax_remote_mapping(hi, usage, bit, max))
165 return 1; 181 return 1;
166 182
183 if (hdev->product == USB_DEVICE_ID_DINOVO_MINI &&
184 lg_dinovo_mapping(hi, usage, bit, max))
185 return 1;
186
167 if ((quirks & LG_WIRELESS) && lg_wireless_mapping(hi, usage, bit, max)) 187 if ((quirks & LG_WIRELESS) && lg_wireless_mapping(hi, usage, bit, max))
168 return 1; 188 return 1;
169 189