Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 643
b: refs/heads/master
c: 146a4b3
h: refs/heads/master
i:
  641: 9f89fc3
  639: 013b7b9
v: v3
  • Loading branch information
Andreas Jaggi authored and Linus Torvalds committed May 1, 2005
1 parent ada0b54 commit c08c42a
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 616299afcebfb2228f45a95aac7e63704c3733fc
refs/heads/master: 146a4b3bdfb5641bfbf975e29680b482b8b343ba
40 changes: 40 additions & 0 deletions trunk/drivers/macintosh/adbhid.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,42 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto
#endif /* CONFIG_PMAC_BACKLIGHT */
input_report_key(&adbhid[id]->input, KEY_BRIGHTNESSUP, down);
break;

case 0xc: /* videomode switch */
input_report_key(&adbhid[id]->input, KEY_SWITCHVIDEOMODE, down);
break;

case 0xd: /* keyboard illumination toggle */
input_report_key(&adbhid[id]->input, KEY_KBDILLUMTOGGLE, down);
break;

case 0xe: /* keyboard illumination decrease */
input_report_key(&adbhid[id]->input, KEY_KBDILLUMDOWN, down);
break;

case 0xf:
switch (data[1]) {
case 0x8f:
case 0x0f:
/* keyboard illumination increase */
input_report_key(&adbhid[id]->input, KEY_KBDILLUMUP, down);
break;

case 0x7f:
case 0xff:
/* keypad overlay toogle */
break;

default:
printk(KERN_INFO "Unhandled ADB_MISC event %02x, %02x, %02x, %02x\n",
data[0], data[1], data[2], data[3]);
break;
}
break;
default:
printk(KERN_INFO "Unhandled ADB_MISC event %02x, %02x, %02x, %02x\n",
data[0], data[1], data[2], data[3]);
break;
}
}
break;
Expand Down Expand Up @@ -775,6 +811,10 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
set_bit(KEY_BRIGHTNESSUP, adbhid[id]->input.keybit);
set_bit(KEY_BRIGHTNESSDOWN, adbhid[id]->input.keybit);
set_bit(KEY_EJECTCD, adbhid[id]->input.keybit);
set_bit(KEY_SWITCHVIDEOMODE, adbhid[id]->input.keybit);
set_bit(KEY_KBDILLUMTOGGLE, adbhid[id]->input.keybit);
set_bit(KEY_KBDILLUMDOWN, adbhid[id]->input.keybit);
set_bit(KEY_KBDILLUMUP, adbhid[id]->input.keybit);
break;
}
if (adbhid[id]->name[0])
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,11 @@ struct input_absinfo {
#define KEY_BRIGHTNESSUP 225
#define KEY_MEDIA 226

#define KEY_SWITCHVIDEOMODE 227
#define KEY_KBDILLUMTOGGLE 228
#define KEY_KBDILLUMDOWN 229
#define KEY_KBDILLUMUP 230

#define KEY_UNKNOWN 240

#define BTN_MISC 0x100
Expand Down

0 comments on commit c08c42a

Please sign in to comment.