Lines Matching +full:0 +full:x8007
6 * Version 2.2.0 Copyright (c) 2004 Torrey Hoffman <thoffman@arnor.net>
9 * This 2.2.0 version is a rewrite / cleanup of the 2.1.1 driver, including
20 * Version 2.2.0
68 * Or, set channel_mask = 65533, (0xFFFD), and all channels except 1 will be
71 * The default is 0 (respond to all channels). Bit 0 and bits 17-32 of this
90 #define ATI_REMOTE_VENDOR_ID 0x0bc7
91 #define LOLA_REMOTE_PRODUCT_ID 0x0002
92 #define LOLA2_REMOTE_PRODUCT_ID 0x0003
93 #define ATI_REMOTE_PRODUCT_ID 0x0004
94 #define NVIDIA_REMOTE_PRODUCT_ID 0x0005
95 #define MEDION_REMOTE_PRODUCT_ID 0x0006
96 #define FIREFLY_REMOTE_PRODUCT_ID 0x0008
137 do { if (debug) dev_info(dev , format , ## arg); } while (0)
221 #define LO(a) ((unsigned char)((a) & 0xff))
227 static char init1[] = { 0x01, 0x00, 0x20, 0x14 };
228 static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 };
260 int users; /* 0-2, users are rc and input */
265 #define KIND_END 0
277 {KIND_ACCEL, 0x70, 0xff00}, /* left */
278 {KIND_ACCEL, 0x71, 0x0100}, /* right */
279 {KIND_ACCEL, 0x72, 0x00ff}, /* up */
280 {KIND_ACCEL, 0x73, 0x0001}, /* down */
283 {KIND_ACCEL, 0x74, 0xffff}, /* left up */
284 {KIND_ACCEL, 0x75, 0x01ff}, /* right up */
285 {KIND_ACCEL, 0x77, 0xff01}, /* left down */
286 {KIND_ACCEL, 0x76, 0x0101}, /* right down */
290 {KIND_LITERAL, 0x78, BTN_LEFT}, /* left btn down */
291 {KIND_LITERAL, 0x79, BTN_LEFT}, /* left btn up */
292 {KIND_LITERAL, 0x7c, BTN_RIGHT},/* right btn down */
293 {KIND_LITERAL, 0x7d, BTN_RIGHT},/* right btn up */
297 {KIND_FILTERED, 0x7a, BTN_SIDE}, /* left dblclick */
298 {KIND_FILTERED, 0x7e, BTN_EXTRA},/* right dblclick */
301 {KIND_END, 0x00, 0}
311 if (data[0] != (unsigned char)0xff && data[0] != 0x00) in ati_remote_dump()
312 dev_warn(dev, "Weird byte 0x%02x\n", data[0]); in ati_remote_dump()
324 int err = 0; in ati_remote_open()
328 if (ati_remote->users++ != 0) in ati_remote_open()
349 if (--ati_remote->users == 0) in ati_remote_close()
404 int retval = 0; in ati_remote_sendpacket()
408 ((char *) ati_remote->out_urb->transfer_buffer)[0] = HI(cmd); in ati_remote_sendpacket()
442 { 20, 0 },
465 for (i = 0; i < ARRAY_SIZE(accel) - 1; i++) { in ati_remote_compute_accel()
489 * data[0] = 0x14 in ati_remote_input_report()
490 * data[1] = data[2] + data[3] + 0xd5 (a checksum byte) in ati_remote_input_report()
496 if ( urb->actual_length != 4 || data[0] != 0x14 || in ati_remote_input_report()
497 data[1] != (unsigned char)(data[2] + data[3] + 0xD5) || in ati_remote_input_report()
498 (data[3] & 0x0f) != 0x00) { in ati_remote_input_report()
503 if (data[1] != ((data[2] + data[3] + 0xd5) & 0xff)) { in ati_remote_input_report()
510 /* note: remote_num is 0-based, channel 1 on remote == 0 here */ in ati_remote_input_report()
511 remote_num = (data[3] >> 4) & 0x0f; in ati_remote_input_report()
514 "Masked input from channel 0x%02x: data %02x, mask= 0x%02lx\n", in ati_remote_input_report()
523 scancode = data[2] & 0x7f; in ati_remote_input_report()
526 "channel 0x%02x; key data %02x, scancode %02x\n", in ati_remote_input_report()
529 if (scancode >= 0x70) { in ati_remote_input_report()
533 * Get the keycode assigned to scancode 0x78/0x70. If it is in ati_remote_input_report()
537 scancode & 0x78); in ati_remote_input_report()
545 for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++) { in ati_remote_input_report()
554 if (index >= 0 && ati_remote_tbl[index].kind == KIND_LITERAL) { in ati_remote_input_report()
564 } else if (index < 0 || ati_remote_tbl[index].kind == KIND_FILTERED) { in ati_remote_input_report()
573 ati_remote->repeat_count = 0; in ati_remote_input_report()
583 if (ati_remote->repeat_count > 0 && in ati_remote_input_report()
589 if (index >= 0) { in ati_remote_input_report()
591 input_event(dev, EV_KEY, ati_remote_tbl[index].code, 0); in ati_remote_input_report()
599 * scroll up (0x78) / down (0x70) scancode in ati_remote_input_report()
603 count = (scancode & 0x07) + 1; in ati_remote_input_report()
604 scancode &= 0x78; in ati_remote_input_report()
656 case 0: /* success */ in ati_remote_irq_in()
695 ati_remote->irq_urb = usb_alloc_urb(0, GFP_KERNEL); in ati_remote_alloc_buffers()
699 ati_remote->out_urb = usb_alloc_urb(0, GFP_KERNEL); in ati_remote_alloc_buffers()
703 return 0; in ati_remote_alloc_buffers()
726 idev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); in ati_remote_input_init()
729 idev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); in ati_remote_input_init()
730 for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++) in ati_remote_input_init()
795 if ((ati_remote_sendpacket(ati_remote, 0x8004, init1)) || in ati_remote_initialize()
796 (ati_remote_sendpacket(ati_remote, 0x8007, init2))) { in ati_remote_initialize()
802 return 0; in ati_remote_initialize()
826 endpoint_in = &iface_host->endpoint[0].desc; in ati_remote_probe()
833 if (le16_to_cpu(endpoint_in->wMaxPacketSize) == 0) { in ati_remote_probe()
834 dev_err(device, "%s: endpoint_in message size==0?\n", __func__); in ati_remote_probe()
918 return 0; in ati_remote_probe()