diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 00:55:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 00:55:47 -0400 |
commit | e86908614f2c7fec401827e5cefd7a6ea9407f85 (patch) | |
tree | fcb5d9e52422b37bdaf0e647126ebdfc1680f162 /drivers/macintosh/adbhid.c | |
parent | 547307420931344a868275bd7ea7a30f117a15a9 (diff) | |
parent | 9b4b8feb962f4b3e74768b7205f1f8f6cce87238 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (408 commits)
[POWERPC] Add memchr() to the bootwrapper
[POWERPC] Implement logging of unhandled signals
[POWERPC] Add legacy serial support for OPB with flattened device tree
[POWERPC] Use 1TB segments
[POWERPC] XilinxFB: Allow fixed framebuffer base address
[POWERPC] XilinxFB: Add support for custom screen resolution
[POWERPC] XilinxFB: Use pdata to pass around framebuffer parameters
[POWERPC] PCI: Add 64-bit physical address support to setup_indirect_pci
[POWERPC] 4xx: Kilauea defconfig file
[POWERPC] 4xx: Kilauea DTS
[POWERPC] 4xx: Add AMCC Kilauea eval board support to platforms/40x
[POWERPC] 4xx: Add AMCC 405EX support to cputable.c
[POWERPC] Adjust TASK_SIZE on ppc32 systems to 3GB that are capable
[POWERPC] Use PAGE_OFFSET to tell if an address is user/kernel in SW TLB handlers
[POWERPC] 85xx: Enable FP emulation in MPC8560 ADS defconfig
[POWERPC] 85xx: Killed <asm/mpc85xx.h>
[POWERPC] 85xx: Add cpm nodes for 8541/8555 CDS
[POWERPC] 85xx: Convert mpc8560ads to the new CPM binding.
[POWERPC] mpc8272ads: Remove muram from the CPM reg property.
[POWERPC] Make clockevents work on PPC601 processors
...
Fixed up conflict in Documentation/powerpc/booting-without-of.txt manually.
Diffstat (limited to 'drivers/macintosh/adbhid.c')
-rw-r--r-- | drivers/macintosh/adbhid.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index b46817f699f1..48d17bf6c927 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c | |||
@@ -70,7 +70,7 @@ static struct notifier_block adbhid_adb_notifier = { | |||
70 | #define ADB_KEY_POWER_OLD 0x7e | 70 | #define ADB_KEY_POWER_OLD 0x7e |
71 | #define ADB_KEY_POWER 0x7f | 71 | #define ADB_KEY_POWER 0x7f |
72 | 72 | ||
73 | u8 adb_to_linux_keycodes[128] = { | 73 | u16 adb_to_linux_keycodes[128] = { |
74 | /* 0x00 */ KEY_A, /* 30 */ | 74 | /* 0x00 */ KEY_A, /* 30 */ |
75 | /* 0x01 */ KEY_S, /* 31 */ | 75 | /* 0x01 */ KEY_S, /* 31 */ |
76 | /* 0x02 */ KEY_D, /* 32 */ | 76 | /* 0x02 */ KEY_D, /* 32 */ |
@@ -134,7 +134,7 @@ u8 adb_to_linux_keycodes[128] = { | |||
134 | /* 0x3c */ KEY_RIGHT, /* 106 */ | 134 | /* 0x3c */ KEY_RIGHT, /* 106 */ |
135 | /* 0x3d */ KEY_DOWN, /* 108 */ | 135 | /* 0x3d */ KEY_DOWN, /* 108 */ |
136 | /* 0x3e */ KEY_UP, /* 103 */ | 136 | /* 0x3e */ KEY_UP, /* 103 */ |
137 | /* 0x3f */ 0, | 137 | /* 0x3f */ KEY_FN, /* 0x1d0 */ |
138 | /* 0x40 */ 0, | 138 | /* 0x40 */ 0, |
139 | /* 0x41 */ KEY_KPDOT, /* 83 */ | 139 | /* 0x41 */ KEY_KPDOT, /* 83 */ |
140 | /* 0x42 */ 0, | 140 | /* 0x42 */ 0, |
@@ -208,7 +208,7 @@ struct adbhid { | |||
208 | int original_handler_id; | 208 | int original_handler_id; |
209 | int current_handler_id; | 209 | int current_handler_id; |
210 | int mouse_kind; | 210 | int mouse_kind; |
211 | unsigned char *keycode; | 211 | u16 *keycode; |
212 | char name[64]; | 212 | char name[64]; |
213 | char phys[32]; | 213 | char phys[32]; |
214 | int flags; | 214 | int flags; |
@@ -275,7 +275,7 @@ static void | |||
275 | adbhid_input_keycode(int id, int keycode, int repeat) | 275 | adbhid_input_keycode(int id, int keycode, int repeat) |
276 | { | 276 | { |
277 | struct adbhid *ahid = adbhid[id]; | 277 | struct adbhid *ahid = adbhid[id]; |
278 | int up_flag; | 278 | int up_flag, key; |
279 | 279 | ||
280 | up_flag = (keycode & 0x80); | 280 | up_flag = (keycode & 0x80); |
281 | keycode &= 0x7f; | 281 | keycode &= 0x7f; |
@@ -321,8 +321,7 @@ adbhid_input_keycode(int id, int keycode, int repeat) | |||
321 | } | 321 | } |
322 | } else | 322 | } else |
323 | ahid->flags |= FLAG_FN_KEY_PRESSED; | 323 | ahid->flags |= FLAG_FN_KEY_PRESSED; |
324 | /* Swallow the key press */ | 324 | break; |
325 | return; | ||
326 | case ADB_KEY_DEL: | 325 | case ADB_KEY_DEL: |
327 | /* Emulate Fn+delete = forward delete */ | 326 | /* Emulate Fn+delete = forward delete */ |
328 | if (ahid->flags & FLAG_FN_KEY_PRESSED) { | 327 | if (ahid->flags & FLAG_FN_KEY_PRESSED) { |
@@ -336,9 +335,9 @@ adbhid_input_keycode(int id, int keycode, int repeat) | |||
336 | #endif /* CONFIG_PPC_PMAC */ | 335 | #endif /* CONFIG_PPC_PMAC */ |
337 | } | 336 | } |
338 | 337 | ||
339 | if (adbhid[id]->keycode[keycode]) { | 338 | key = adbhid[id]->keycode[keycode]; |
340 | input_report_key(adbhid[id]->input, | 339 | if (key) { |
341 | adbhid[id]->keycode[keycode], !up_flag); | 340 | input_report_key(adbhid[id]->input, key, !up_flag); |
342 | input_sync(adbhid[id]->input); | 341 | input_sync(adbhid[id]->input); |
343 | } else | 342 | } else |
344 | printk(KERN_INFO "Unhandled ADB key (scancode %#02x) %s.\n", keycode, | 343 | printk(KERN_INFO "Unhandled ADB key (scancode %#02x) %s.\n", keycode, |
@@ -757,8 +756,8 @@ adbhid_input_register(int id, int default_id, int original_handler_id, | |||
757 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP); | 756 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP); |
758 | input_dev->ledbit[0] = BIT(LED_SCROLLL) | BIT(LED_CAPSL) | BIT(LED_NUML); | 757 | input_dev->ledbit[0] = BIT(LED_SCROLLL) | BIT(LED_CAPSL) | BIT(LED_NUML); |
759 | input_dev->event = adbhid_kbd_event; | 758 | input_dev->event = adbhid_kbd_event; |
760 | input_dev->keycodemax = 127; | 759 | input_dev->keycodemax = KEY_FN; |
761 | input_dev->keycodesize = 1; | 760 | input_dev->keycodesize = sizeof(hid->keycode[0]); |
762 | break; | 761 | break; |
763 | 762 | ||
764 | case ADB_MOUSE: | 763 | case ADB_MOUSE: |