summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2009-11-24 18:22:20 +0100
committerJiri Kosina <jkosina@suse.cz>2009-11-25 16:20:52 +0100
commit66d61bec697e99476c2fb095f9a6ead3be2e1c21 (patch)
treef310279f00e1f71dc7537b0d3d71494f67dbd99a /drivers
parent1168df7e1cbfa4b45ba2bfd982ff535df50c273c (diff)
downloadop-kernel-dev-66d61bec697e99476c2fb095f9a6ead3be2e1c21.zip
op-kernel-dev-66d61bec697e99476c2fb095f9a6ead3be2e1c21.tar.gz
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')
-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 0f870a3..4a48978 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,
return 1;
}
+static int lg_dinovo_mapping(struct hid_input *hi, struct hid_usage *usage,
+ unsigned long **bit, int *max)
+{
+ if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR)
+ return 0;
+
+ switch (usage->hid & HID_USAGE) {
+
+ case 0x00d: lg_map_key_clear(KEY_MEDIA); break;
+ default:
+ return 0;
+
+ }
+ return 1;
+}
+
static int lg_wireless_mapping(struct hid_input *hi, struct hid_usage *usage,
unsigned long **bit, int *max)
{
@@ -164,6 +180,10 @@ static int lg_input_mapping(struct hid_device *hdev, struct hid_input *hi,
lg_ultrax_remote_mapping(hi, usage, bit, max))
return 1;
+ if (hdev->product == USB_DEVICE_ID_DINOVO_MINI &&
+ lg_dinovo_mapping(hi, usage, bit, max))
+ return 1;
+
if ((quirks & LG_WIRELESS) && lg_wireless_mapping(hi, usage, bit, max))
return 1;
OpenPOWER on IntegriCloud