aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/adbhid.c40
-rw-r--r--drivers/macintosh/via-pmu.c9
2 files changed, 47 insertions, 2 deletions
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c
index 8f93d01d8928..db654e8bd67e 100644
--- a/drivers/macintosh/adbhid.c
+++ b/drivers/macintosh/adbhid.c
@@ -555,6 +555,42 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto
555#endif /* CONFIG_PMAC_BACKLIGHT */ 555#endif /* CONFIG_PMAC_BACKLIGHT */
556 input_report_key(&adbhid[id]->input, KEY_BRIGHTNESSUP, down); 556 input_report_key(&adbhid[id]->input, KEY_BRIGHTNESSUP, down);
557 break; 557 break;
558
559 case 0xc: /* videomode switch */
560 input_report_key(&adbhid[id]->input, KEY_SWITCHVIDEOMODE, down);
561 break;
562
563 case 0xd: /* keyboard illumination toggle */
564 input_report_key(&adbhid[id]->input, KEY_KBDILLUMTOGGLE, down);
565 break;
566
567 case 0xe: /* keyboard illumination decrease */
568 input_report_key(&adbhid[id]->input, KEY_KBDILLUMDOWN, down);
569 break;
570
571 case 0xf:
572 switch (data[1]) {
573 case 0x8f:
574 case 0x0f:
575 /* keyboard illumination increase */
576 input_report_key(&adbhid[id]->input, KEY_KBDILLUMUP, down);
577 break;
578
579 case 0x7f:
580 case 0xff:
581 /* keypad overlay toogle */
582 break;
583
584 default:
585 printk(KERN_INFO "Unhandled ADB_MISC event %02x, %02x, %02x, %02x\n",
586 data[0], data[1], data[2], data[3]);
587 break;
588 }
589 break;
590 default:
591 printk(KERN_INFO "Unhandled ADB_MISC event %02x, %02x, %02x, %02x\n",
592 data[0], data[1], data[2], data[3]);
593 break;
558 } 594 }
559 } 595 }
560 break; 596 break;
@@ -775,6 +811,10 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
775 set_bit(KEY_BRIGHTNESSUP, adbhid[id]->input.keybit); 811 set_bit(KEY_BRIGHTNESSUP, adbhid[id]->input.keybit);
776 set_bit(KEY_BRIGHTNESSDOWN, adbhid[id]->input.keybit); 812 set_bit(KEY_BRIGHTNESSDOWN, adbhid[id]->input.keybit);
777 set_bit(KEY_EJECTCD, adbhid[id]->input.keybit); 813 set_bit(KEY_EJECTCD, adbhid[id]->input.keybit);
814 set_bit(KEY_SWITCHVIDEOMODE, adbhid[id]->input.keybit);
815 set_bit(KEY_KBDILLUMTOGGLE, adbhid[id]->input.keybit);
816 set_bit(KEY_KBDILLUMDOWN, adbhid[id]->input.keybit);
817 set_bit(KEY_KBDILLUMUP, adbhid[id]->input.keybit);
778 break; 818 break;
779 } 819 }
780 if (adbhid[id]->name[0]) 820 if (adbhid[id]->name[0])
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index fdea1a3a631d..e654aa5eecd4 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -2351,6 +2351,10 @@ pmac_suspend_devices(void)
2351 return -EBUSY; 2351 return -EBUSY;
2352 } 2352 }
2353 2353
2354 /* Disable clock spreading on some machines */
2355 pmac_tweak_clock_spreading(0);
2356
2357 /* Stop preemption */
2354 preempt_disable(); 2358 preempt_disable();
2355 2359
2356 /* Make sure the decrementer won't interrupt us */ 2360 /* Make sure the decrementer won't interrupt us */
@@ -2417,11 +2421,12 @@ pmac_wakeup_devices(void)
2417 2421
2418 /* Re-enable local CPU interrupts */ 2422 /* Re-enable local CPU interrupts */
2419 local_irq_enable(); 2423 local_irq_enable();
2420
2421 mdelay(100); 2424 mdelay(100);
2422
2423 preempt_enable(); 2425 preempt_enable();
2424 2426
2427 /* Re-enable clock spreading on some machines */
2428 pmac_tweak_clock_spreading(1);
2429
2425 /* Resume devices */ 2430 /* Resume devices */
2426 device_resume(); 2431 device_resume();
2427 2432