input_report_key(&adbhid[id]->input, KEY_KBDILLUMTOGGLE, down); 
input_report_key(adbhid[id]->input, KEY_KBDILLUMTOGGLE, down); 
adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int autopoll){	int id = (data[0] >> 4) & 0x0f;	if (!adbhid[id]) {		printk(KERN_ERR "ADB HID on ID %d not yet registered\n", id);		return;	}	input_regs(&adbhid[id]->input, regs);	switch (adbhid[id]->original_handler_id) {	default:	case 0x02: /* Adjustable keyboard button device */	  {		int down = (data[1] == (data[1] & 0xf));		switch (data[1] & 0x0f) {		case 0x0:	/* microphone */			input_report_key(&adbhid[id]->input, KEY_SOUND, down);			break;		case 0x1:	/* mute */			input_report_key(&adbhid[id]->input, KEY_MUTE, down);			break;		case 0x2:	/* volume decrease */			input_report_key(&adbhid[id]->input, KEY_VOLUMEDOWN, down);			break;		case 0x3:	/* volume increase */			input_report_key(&adbhid[id]->input, KEY_VOLUMEUP, down);			break;		default:			printk(KERN_INFO "Unhandled ADB_MISC event %02x, %02x, %02x, %02x\n",			       data[0], data[1], data[2], data[3]);			break;		}	  }	  break;	case 0x1f: /* Powerbook button device */	  {		int down = (data[1] == (data[1] & 0xf));#ifdef CONFIG_PMAC_BACKLIGHT		int backlight = get_backlight_level();#endif		/*		 * XXX: Where is the contrast control for the passive?		 *  -- Cort		 */		switch (data[1] & 0x0f) {		case 0x8:	/* mute */			input_report_key(&adbhid[id]->input, KEY_MUTE, down);			break;		case 0x7:	/* volume decrease */			input_report_key(&adbhid[id]->input, KEY_VOLUMEDOWN, down);			break;		case 0x6:	/* volume increase */			input_report_key(&adbhid[id]->input, KEY_VOLUMEUP, down);			break;		case 0xb:	/* eject */			input_report_key(&adbhid[id]->input, KEY_EJECTCD, down);			break;		case 0xa:	/* brightness decrease */#ifdef CONFIG_PMAC_BACKLIGHT			if (!disable_kernel_backlight) {				if (down && backlight >= 0) {					if (backlight > BACKLIGHT_OFF)						set_backlight_level(backlight-1);					else						set_backlight_level(BACKLIGHT_OFF);				}			}#endif /* CONFIG_PMAC_BACKLIGHT */			input_report_key(&adbhid[id]->input, KEY_BRIGHTNESSDOWN, down);			break;		case 0x9:	/* brightness increase */#ifdef CONFIG_PMAC_BACKLIGHT			if (!disable_kernel_backlight) {				if (down && backlight >= 0) {					if (backlight < BACKLIGHT_MAX)						set_backlight_level(backlight+1);					else 						set_backlight_level(BACKLIGHT_MAX);				}			}#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;	}	input_sync(&adbhid[id]->input);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c7f7a569d9b4ea7c53ab6fcd1377895312d8372b/adbhid.c/clean/drivers/macintosh/adbhid.c