rr3 137 arch/ia64/include/asm/mmu_context.h unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4; rr3 147 arch/ia64/include/asm/mmu_context.h rr3 = rr0 + 3*rid_incr; rr3 157 arch/ia64/include/asm/mmu_context.h ia64_set_rr0_to_rr4(rr0, rr1, rr2, rr3, rr4); rr3 37 arch/powerpc/platforms/4xx/gpio.c __be32 rr3; rr3 236 drivers/media/rc/redrat3.c static void redrat3_dump_fw_error(struct redrat3_dev *rr3, int code) rr3 238 drivers/media/rc/redrat3.c if (!rr3->transmitting && (code != 0x40)) rr3 239 drivers/media/rc/redrat3.c dev_info(rr3->dev, "fw error code 0x%02x: ", code); rr3 276 drivers/media/rc/redrat3.c if (!rr3->transmitting) rr3 339 drivers/media/rc/redrat3.c static void redrat3_process_ir_data(struct redrat3_dev *rr3) rr3 346 drivers/media/rc/redrat3.c dev = rr3->dev; rr3 348 drivers/media/rc/redrat3.c mod_freq = redrat3_val_to_mod_freq(&rr3->irdata); rr3 350 drivers/media/rc/redrat3.c if (mod_freq && rr3->wideband) { rr3 356 drivers/media/rc/redrat3.c ir_raw_event_store(rr3->rc, &ev); rr3 360 drivers/media/rc/redrat3.c sig_size = be16_to_cpu(rr3->irdata.sig_size); rr3 362 drivers/media/rc/redrat3.c offset = rr3->irdata.sigdata[i]; rr3 363 drivers/media/rc/redrat3.c val = get_unaligned_be16(&rr3->irdata.lens[offset]); rr3 379 drivers/media/rc/redrat3.c ir_raw_event_store_with_filter(rr3->rc, &rawir); rr3 385 drivers/media/rc/redrat3.c rawir.duration = rr3->rc->timeout; rr3 388 drivers/media/rc/redrat3.c ir_raw_event_store_with_filter(rr3->rc, &rawir); rr3 391 drivers/media/rc/redrat3.c ir_raw_event_handle(rr3->rc); rr3 395 drivers/media/rc/redrat3.c static int redrat3_send_cmd(int cmd, struct redrat3_dev *rr3) rr3 405 drivers/media/rc/redrat3.c udev = rr3->udev; rr3 411 drivers/media/rc/redrat3.c dev_err(rr3->dev, "%s: Error sending rr3 cmd res %d, data %d", rr3 423 drivers/media/rc/redrat3.c static int redrat3_enable_detector(struct redrat3_dev *rr3) rr3 425 drivers/media/rc/redrat3.c struct device *dev = rr3->dev; rr3 428 drivers/media/rc/redrat3.c ret = redrat3_send_cmd(RR3_RC_DET_ENABLE, rr3); rr3 433 drivers/media/rc/redrat3.c ret = redrat3_send_cmd(RR3_RC_DET_STATUS, rr3); rr3 440 drivers/media/rc/redrat3.c ret = usb_submit_urb(rr3->narrow_urb, GFP_KERNEL); rr3 442 drivers/media/rc/redrat3.c dev_err(rr3->dev, "narrow band urb failed: %d", ret); rr3 446 drivers/media/rc/redrat3.c ret = usb_submit_urb(rr3->wide_urb, GFP_KERNEL); rr3 448 drivers/media/rc/redrat3.c dev_err(rr3->dev, "wide band urb failed: %d", ret); rr3 453 drivers/media/rc/redrat3.c static inline void redrat3_delete(struct redrat3_dev *rr3, rr3 456 drivers/media/rc/redrat3.c usb_kill_urb(rr3->narrow_urb); rr3 457 drivers/media/rc/redrat3.c usb_kill_urb(rr3->wide_urb); rr3 458 drivers/media/rc/redrat3.c usb_kill_urb(rr3->flash_urb); rr3 459 drivers/media/rc/redrat3.c usb_kill_urb(rr3->learn_urb); rr3 460 drivers/media/rc/redrat3.c usb_free_urb(rr3->narrow_urb); rr3 461 drivers/media/rc/redrat3.c usb_free_urb(rr3->wide_urb); rr3 462 drivers/media/rc/redrat3.c usb_free_urb(rr3->flash_urb); rr3 463 drivers/media/rc/redrat3.c usb_free_urb(rr3->learn_urb); rr3 464 drivers/media/rc/redrat3.c usb_free_coherent(udev, le16_to_cpu(rr3->ep_narrow->wMaxPacketSize), rr3 465 drivers/media/rc/redrat3.c rr3->bulk_in_buf, rr3->dma_in); rr3 467 drivers/media/rc/redrat3.c kfree(rr3); rr3 470 drivers/media/rc/redrat3.c static u32 redrat3_get_timeout(struct redrat3_dev *rr3) rr3 481 drivers/media/rc/redrat3.c pipe = usb_rcvctrlpipe(rr3->udev, 0); rr3 482 drivers/media/rc/redrat3.c ret = usb_control_msg(rr3->udev, pipe, RR3_GET_IR_PARAM, rr3 486 drivers/media/rc/redrat3.c dev_warn(rr3->dev, "Failed to read timeout from hardware\n"); rr3 490 drivers/media/rc/redrat3.c dev_dbg(rr3->dev, "Got timeout of %d ms\n", timeout / 1000); rr3 500 drivers/media/rc/redrat3.c struct redrat3_dev *rr3 = rc_dev->priv; rr3 501 drivers/media/rc/redrat3.c struct usb_device *udev = rr3->udev; rr3 502 drivers/media/rc/redrat3.c struct device *dev = rr3->dev; rr3 528 drivers/media/rc/redrat3.c static void redrat3_reset(struct redrat3_dev *rr3) rr3 530 drivers/media/rc/redrat3.c struct usb_device *udev = rr3->udev; rr3 531 drivers/media/rc/redrat3.c struct device *dev = rr3->dev; rr3 577 drivers/media/rc/redrat3.c static void redrat3_get_firmware_rev(struct redrat3_dev *rr3) rr3 586 drivers/media/rc/redrat3.c rc = usb_control_msg(rr3->udev, usb_rcvctrlpipe(rr3->udev, 0), rr3 592 drivers/media/rc/redrat3.c dev_info(rr3->dev, "Firmware rev: %s", buffer); rr3 594 drivers/media/rc/redrat3.c dev_err(rr3->dev, "Problem fetching firmware ID\n"); rr3 599 drivers/media/rc/redrat3.c static void redrat3_read_packet_start(struct redrat3_dev *rr3, unsigned len) rr3 601 drivers/media/rc/redrat3.c struct redrat3_header *header = rr3->bulk_in_buf; rr3 608 drivers/media/rc/redrat3.c if (pktlen > sizeof(rr3->irdata)) { rr3 609 drivers/media/rc/redrat3.c dev_warn(rr3->dev, "packet length %u too large\n", pktlen); rr3 616 drivers/media/rc/redrat3.c struct redrat3_error *error = rr3->bulk_in_buf; rr3 618 drivers/media/rc/redrat3.c redrat3_dump_fw_error(rr3, fw_error); rr3 623 drivers/media/rc/redrat3.c memcpy(&rr3->irdata, rr3->bulk_in_buf, len); rr3 624 drivers/media/rc/redrat3.c rr3->bytes_read = len; rr3 625 drivers/media/rc/redrat3.c dev_dbg(rr3->dev, "bytes_read %d, pktlen %d\n", rr3 626 drivers/media/rc/redrat3.c rr3->bytes_read, pktlen); rr3 630 drivers/media/rc/redrat3.c dev_dbg(rr3->dev, "ignoring packet with type 0x%02x, len of %d, 0x%02x\n", rr3 636 drivers/media/rc/redrat3.c static void redrat3_read_packet_continue(struct redrat3_dev *rr3, unsigned len) rr3 638 drivers/media/rc/redrat3.c void *irdata = &rr3->irdata; rr3 640 drivers/media/rc/redrat3.c if (len + rr3->bytes_read > sizeof(rr3->irdata)) { rr3 641 drivers/media/rc/redrat3.c dev_warn(rr3->dev, "too much data for packet\n"); rr3 642 drivers/media/rc/redrat3.c rr3->bytes_read = 0; rr3 646 drivers/media/rc/redrat3.c memcpy(irdata + rr3->bytes_read, rr3->bulk_in_buf, len); rr3 648 drivers/media/rc/redrat3.c rr3->bytes_read += len; rr3 649 drivers/media/rc/redrat3.c dev_dbg(rr3->dev, "bytes_read %d, pktlen %d\n", rr3->bytes_read, rr3 650 drivers/media/rc/redrat3.c be16_to_cpu(rr3->irdata.header.length)); rr3 654 drivers/media/rc/redrat3.c static int redrat3_get_ir_data(struct redrat3_dev *rr3, unsigned len) rr3 656 drivers/media/rc/redrat3.c struct device *dev = rr3->dev; rr3 660 drivers/media/rc/redrat3.c if (rr3->bytes_read == 0 && len >= sizeof(struct redrat3_header)) { rr3 661 drivers/media/rc/redrat3.c redrat3_read_packet_start(rr3, len); rr3 662 drivers/media/rc/redrat3.c } else if (rr3->bytes_read != 0) { rr3 663 drivers/media/rc/redrat3.c redrat3_read_packet_continue(rr3, len); rr3 664 drivers/media/rc/redrat3.c } else if (rr3->bytes_read == 0) { rr3 670 drivers/media/rc/redrat3.c if (rr3->bytes_read < be16_to_cpu(rr3->irdata.header.length) + rr3 676 drivers/media/rc/redrat3.c pkttype = be16_to_cpu(rr3->irdata.header.transfer_type); rr3 678 drivers/media/rc/redrat3.c redrat3_process_ir_data(rr3); rr3 684 drivers/media/rc/redrat3.c rr3->bytes_read = 0; rr3 691 drivers/media/rc/redrat3.c struct redrat3_dev *rr3 = urb->context; rr3 696 drivers/media/rc/redrat3.c ret = redrat3_get_ir_data(rr3, urb->actual_length); rr3 697 drivers/media/rc/redrat3.c if (!ret && rr3->wideband && !rr3->learn_urb->hcpriv) { rr3 698 drivers/media/rc/redrat3.c ret = usb_submit_urb(rr3->learn_urb, GFP_ATOMIC); rr3 700 drivers/media/rc/redrat3.c dev_err(rr3->dev, "Failed to submit learning urb: %d", rr3 708 drivers/media/rc/redrat3.c dev_err(rr3->dev, "Failed to resubmit urb: %d", rr3 721 drivers/media/rc/redrat3.c dev_warn(rr3->dev, "Error: urb status = %d\n", urb->status); rr3 722 drivers/media/rc/redrat3.c rr3->bytes_read = 0; rr3 737 drivers/media/rc/redrat3.c struct redrat3_dev *rr3 = rcdev->priv; rr3 738 drivers/media/rc/redrat3.c struct device *dev = rr3->dev; rr3 744 drivers/media/rc/redrat3.c rr3->carrier = carrier; rr3 752 drivers/media/rc/redrat3.c struct redrat3_dev *rr3 = rcdev->priv; rr3 753 drivers/media/rc/redrat3.c struct device *dev = rr3->dev; rr3 761 drivers/media/rc/redrat3.c if (rr3->transmitting) { rr3 770 drivers/media/rc/redrat3.c rr3->transmitting = true; rr3 823 drivers/media/rc/redrat3.c irdata->mod_freq_count = cpu_to_be16(mod_freq_to_val(rr3->carrier)); rr3 827 drivers/media/rc/redrat3.c pipe = usb_sndbulkpipe(rr3->udev, rr3->ep_out->bEndpointAddress); rr3 828 drivers/media/rc/redrat3.c ret = usb_bulk_msg(rr3->udev, pipe, irdata, rr3 833 drivers/media/rc/redrat3.c pipe = usb_rcvctrlpipe(rr3->udev, 0); rr3 834 drivers/media/rc/redrat3.c ret = usb_control_msg(rr3->udev, pipe, RR3_TX_SEND_SIGNAL, rr3 847 drivers/media/rc/redrat3.c rr3->transmitting = false; rr3 856 drivers/media/rc/redrat3.c struct redrat3_dev *rr3 = container_of(led_dev, struct redrat3_dev, rr3 859 drivers/media/rc/redrat3.c if (brightness != LED_OFF && atomic_cmpxchg(&rr3->flash, 0, 1) == 0) { rr3 860 drivers/media/rc/redrat3.c int ret = usb_submit_urb(rr3->flash_urb, GFP_ATOMIC); rr3 862 drivers/media/rc/redrat3.c dev_dbg(rr3->dev, "%s: unexpected ret of %d\n", rr3 864 drivers/media/rc/redrat3.c atomic_set(&rr3->flash, 0); rr3 871 drivers/media/rc/redrat3.c struct redrat3_dev *rr3 = rcdev->priv; rr3 874 drivers/media/rc/redrat3.c rr3->wideband = enable != 0; rr3 877 drivers/media/rc/redrat3.c ret = usb_submit_urb(rr3->learn_urb, GFP_KERNEL); rr3 879 drivers/media/rc/redrat3.c dev_err(rr3->dev, "Failed to submit learning urb: %d", rr3 888 drivers/media/rc/redrat3.c struct redrat3_dev *rr3 = urb->context; rr3 900 drivers/media/rc/redrat3.c dev_err(rr3->dev, "Error: learn urb status = %d", urb->status); rr3 907 drivers/media/rc/redrat3.c struct redrat3_dev *rr3 = urb->context; rr3 919 drivers/media/rc/redrat3.c dev_dbg(rr3->dev, "Error: urb status = %d\n", urb->status); rr3 923 drivers/media/rc/redrat3.c rr3->led.brightness = LED_OFF; rr3 924 drivers/media/rc/redrat3.c atomic_dec(&rr3->flash); rr3 927 drivers/media/rc/redrat3.c static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3) rr3 929 drivers/media/rc/redrat3.c struct device *dev = rr3->dev; rr3 932 drivers/media/rc/redrat3.c u16 prod = le16_to_cpu(rr3->udev->descriptor.idProduct); rr3 938 drivers/media/rc/redrat3.c snprintf(rr3->name, sizeof(rr3->name), rr3 942 drivers/media/rc/redrat3.c usb_make_path(rr3->udev, rr3->phys, sizeof(rr3->phys)); rr3 944 drivers/media/rc/redrat3.c rc->device_name = rr3->name; rr3 945 drivers/media/rc/redrat3.c rc->input_phys = rr3->phys; rr3 946 drivers/media/rc/redrat3.c usb_to_input_id(rr3->udev, &rc->input_id); rr3 948 drivers/media/rc/redrat3.c rc->priv = rr3; rr3 952 drivers/media/rc/redrat3.c rc->timeout = US_TO_NS(redrat3_get_timeout(rr3)); rr3 980 drivers/media/rc/redrat3.c struct redrat3_dev *rr3; rr3 1026 drivers/media/rc/redrat3.c rr3 = kzalloc(sizeof(*rr3), GFP_KERNEL); rr3 1027 drivers/media/rc/redrat3.c if (!rr3) rr3 1030 drivers/media/rc/redrat3.c rr3->dev = &intf->dev; rr3 1031 drivers/media/rc/redrat3.c rr3->ep_narrow = ep_narrow; rr3 1032 drivers/media/rc/redrat3.c rr3->ep_out = ep_out; rr3 1033 drivers/media/rc/redrat3.c rr3->udev = udev; rr3 1036 drivers/media/rc/redrat3.c rr3->narrow_urb = usb_alloc_urb(0, GFP_KERNEL); rr3 1037 drivers/media/rc/redrat3.c if (!rr3->narrow_urb) rr3 1040 drivers/media/rc/redrat3.c rr3->wide_urb = usb_alloc_urb(0, GFP_KERNEL); rr3 1041 drivers/media/rc/redrat3.c if (!rr3->wide_urb) rr3 1044 drivers/media/rc/redrat3.c rr3->bulk_in_buf = usb_alloc_coherent(udev, rr3 1046 drivers/media/rc/redrat3.c GFP_KERNEL, &rr3->dma_in); rr3 1047 drivers/media/rc/redrat3.c if (!rr3->bulk_in_buf) rr3 1051 drivers/media/rc/redrat3.c usb_fill_bulk_urb(rr3->narrow_urb, udev, pipe, rr3->bulk_in_buf, rr3 1053 drivers/media/rc/redrat3.c redrat3_handle_async, rr3); rr3 1054 drivers/media/rc/redrat3.c rr3->narrow_urb->transfer_dma = rr3->dma_in; rr3 1055 drivers/media/rc/redrat3.c rr3->narrow_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; rr3 1058 drivers/media/rc/redrat3.c usb_fill_bulk_urb(rr3->wide_urb, udev, pipe, rr3->bulk_in_buf, rr3 1060 drivers/media/rc/redrat3.c redrat3_handle_async, rr3); rr3 1061 drivers/media/rc/redrat3.c rr3->wide_urb->transfer_dma = rr3->dma_in; rr3 1062 drivers/media/rc/redrat3.c rr3->wide_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; rr3 1064 drivers/media/rc/redrat3.c redrat3_reset(rr3); rr3 1065 drivers/media/rc/redrat3.c redrat3_get_firmware_rev(rr3); rr3 1068 drivers/media/rc/redrat3.c rr3->carrier = 38000; rr3 1070 drivers/media/rc/redrat3.c atomic_set(&rr3->flash, 0); rr3 1071 drivers/media/rc/redrat3.c rr3->flash_urb = usb_alloc_urb(0, GFP_KERNEL); rr3 1072 drivers/media/rc/redrat3.c if (!rr3->flash_urb) rr3 1076 drivers/media/rc/redrat3.c rr3->learn_urb = usb_alloc_urb(0, GFP_KERNEL); rr3 1077 drivers/media/rc/redrat3.c if (!rr3->learn_urb) rr3 1081 drivers/media/rc/redrat3.c rr3->learn_control.bRequestType = 0xc0; rr3 1082 drivers/media/rc/redrat3.c rr3->learn_control.bRequest = RR3_MODSIG_CAPTURE; rr3 1083 drivers/media/rc/redrat3.c rr3->learn_control.wLength = cpu_to_le16(1); rr3 1085 drivers/media/rc/redrat3.c usb_fill_control_urb(rr3->learn_urb, udev, usb_rcvctrlpipe(udev, 0), rr3 1086 drivers/media/rc/redrat3.c (unsigned char *)&rr3->learn_control, rr3 1087 drivers/media/rc/redrat3.c &rr3->learn_buf, sizeof(rr3->learn_buf), rr3 1088 drivers/media/rc/redrat3.c redrat3_learn_complete, rr3); rr3 1091 drivers/media/rc/redrat3.c rr3->flash_control.bRequestType = 0xc0; rr3 1092 drivers/media/rc/redrat3.c rr3->flash_control.bRequest = RR3_BLINK_LED; rr3 1093 drivers/media/rc/redrat3.c rr3->flash_control.wLength = cpu_to_le16(1); rr3 1095 drivers/media/rc/redrat3.c usb_fill_control_urb(rr3->flash_urb, udev, usb_rcvctrlpipe(udev, 0), rr3 1096 drivers/media/rc/redrat3.c (unsigned char *)&rr3->flash_control, rr3 1097 drivers/media/rc/redrat3.c &rr3->flash_in_buf, sizeof(rr3->flash_in_buf), rr3 1098 drivers/media/rc/redrat3.c redrat3_led_complete, rr3); rr3 1101 drivers/media/rc/redrat3.c rr3->led.name = "redrat3:red:feedback"; rr3 1102 drivers/media/rc/redrat3.c rr3->led.default_trigger = "rc-feedback"; rr3 1103 drivers/media/rc/redrat3.c rr3->led.brightness_set = redrat3_brightness_set; rr3 1104 drivers/media/rc/redrat3.c retval = led_classdev_register(&intf->dev, &rr3->led); rr3 1108 drivers/media/rc/redrat3.c rr3->rc = redrat3_init_rc_dev(rr3); rr3 1109 drivers/media/rc/redrat3.c if (!rr3->rc) { rr3 1115 drivers/media/rc/redrat3.c retval = redrat3_enable_detector(rr3); rr3 1120 drivers/media/rc/redrat3.c usb_set_intfdata(intf, rr3); rr3 1125 drivers/media/rc/redrat3.c led_classdev_unregister(&rr3->led); rr3 1127 drivers/media/rc/redrat3.c redrat3_delete(rr3, rr3->udev); rr3 1136 drivers/media/rc/redrat3.c struct redrat3_dev *rr3 = usb_get_intfdata(intf); rr3 1139 drivers/media/rc/redrat3.c rc_unregister_device(rr3->rc); rr3 1140 drivers/media/rc/redrat3.c led_classdev_unregister(&rr3->led); rr3 1141 drivers/media/rc/redrat3.c redrat3_delete(rr3, udev); rr3 1146 drivers/media/rc/redrat3.c struct redrat3_dev *rr3 = usb_get_intfdata(intf); rr3 1148 drivers/media/rc/redrat3.c led_classdev_suspend(&rr3->led); rr3 1149 drivers/media/rc/redrat3.c usb_kill_urb(rr3->narrow_urb); rr3 1150 drivers/media/rc/redrat3.c usb_kill_urb(rr3->wide_urb); rr3 1151 drivers/media/rc/redrat3.c usb_kill_urb(rr3->flash_urb); rr3 1157 drivers/media/rc/redrat3.c struct redrat3_dev *rr3 = usb_get_intfdata(intf); rr3 1159 drivers/media/rc/redrat3.c if (usb_submit_urb(rr3->narrow_urb, GFP_ATOMIC)) rr3 1161 drivers/media/rc/redrat3.c if (usb_submit_urb(rr3->wide_urb, GFP_ATOMIC)) rr3 1163 drivers/media/rc/redrat3.c led_classdev_resume(&rr3->led);