aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 9cf591a1bda3..c7a6833f6821 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -35,6 +35,11 @@
35 35
36#include <linux/hid.h> 36#include <linux/hid.h>
37 37
38static int hid_pb_fnmode = 1;
39module_param_named(pb_fnmode, hid_pb_fnmode, int, 0644);
40MODULE_PARM_DESC(pb_fnmode,
41 "Mode of fn key on PowerBooks (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst)");
42
38#define unk KEY_UNKNOWN 43#define unk KEY_UNKNOWN
39 44
40static const unsigned char hid_keyboard[256] = { 45static const unsigned char hid_keyboard[256] = {
@@ -154,7 +159,7 @@ static int hidinput_pb_event(struct hid_device *hid, struct input_dev *input,
154 return 1; 159 return 1;
155 } 160 }
156 161
157 if (hid->pb_fnmode) { 162 if (hid_pb_fnmode) {
158 int do_translate; 163 int do_translate;
159 164
160 trans = find_translation(powerbook_fn_keys, usage->code); 165 trans = find_translation(powerbook_fn_keys, usage->code);
@@ -163,8 +168,8 @@ static int hidinput_pb_event(struct hid_device *hid, struct input_dev *input,
163 do_translate = 1; 168 do_translate = 1;
164 else if (trans->flags & POWERBOOK_FLAG_FKEY) 169 else if (trans->flags & POWERBOOK_FLAG_FKEY)
165 do_translate = 170 do_translate =
166 (hid->pb_fnmode == 2 && (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)) || 171 (hid_pb_fnmode == 2 && (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)) ||
167 (hid->pb_fnmode == 1 && !(hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)); 172 (hid_pb_fnmode == 1 && !(hid->quirks & HID_QUIRK_POWERBOOK_FN_ON));
168 else 173 else
169 do_translate = (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON); 174 do_translate = (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON);
170 175
@@ -431,6 +436,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
431 case 0x040: map_key_clear(KEY_MENU); break; 436 case 0x040: map_key_clear(KEY_MENU); break;
432 case 0x045: map_key_clear(KEY_RADIO); break; 437 case 0x045: map_key_clear(KEY_RADIO); break;
433 438
439 case 0x083: map_key_clear(KEY_LAST); break;
434 case 0x088: map_key_clear(KEY_PC); break; 440 case 0x088: map_key_clear(KEY_PC); break;
435 case 0x089: map_key_clear(KEY_TV); break; 441 case 0x089: map_key_clear(KEY_TV); break;
436 case 0x08a: map_key_clear(KEY_WWW); break; 442 case 0x08a: map_key_clear(KEY_WWW); break;
@@ -448,6 +454,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
448 case 0x096: map_key_clear(KEY_TAPE); break; 454 case 0x096: map_key_clear(KEY_TAPE); break;
449 case 0x097: map_key_clear(KEY_TV2); break; 455 case 0x097: map_key_clear(KEY_TV2); break;
450 case 0x098: map_key_clear(KEY_SAT); break; 456 case 0x098: map_key_clear(KEY_SAT); break;
457 case 0x09a: map_key_clear(KEY_PVR); break;
451 458
452 case 0x09c: map_key_clear(KEY_CHANNELUP); break; 459 case 0x09c: map_key_clear(KEY_CHANNELUP); break;
453 case 0x09d: map_key_clear(KEY_CHANNELDOWN); break; 460 case 0x09d: map_key_clear(KEY_CHANNELDOWN); break;