ati_remote 324 drivers/media/rc/ati_remote.c static int ati_remote_open(struct ati_remote *ati_remote) ati_remote 328 drivers/media/rc/ati_remote.c mutex_lock(&ati_remote->open_mutex); ati_remote 330 drivers/media/rc/ati_remote.c if (ati_remote->users++ != 0) ati_remote 334 drivers/media/rc/ati_remote.c ati_remote->irq_urb->dev = ati_remote->udev; ati_remote 335 drivers/media/rc/ati_remote.c if (usb_submit_urb(ati_remote->irq_urb, GFP_KERNEL)) { ati_remote 336 drivers/media/rc/ati_remote.c dev_err(&ati_remote->interface->dev, ati_remote 341 drivers/media/rc/ati_remote.c out: mutex_unlock(&ati_remote->open_mutex); ati_remote 348 drivers/media/rc/ati_remote.c static void ati_remote_close(struct ati_remote *ati_remote) ati_remote 350 drivers/media/rc/ati_remote.c mutex_lock(&ati_remote->open_mutex); ati_remote 351 drivers/media/rc/ati_remote.c if (--ati_remote->users == 0) ati_remote 352 drivers/media/rc/ati_remote.c usb_kill_urb(ati_remote->irq_urb); ati_remote 353 drivers/media/rc/ati_remote.c mutex_unlock(&ati_remote->open_mutex); ati_remote 358 drivers/media/rc/ati_remote.c struct ati_remote *ati_remote = input_get_drvdata(inputdev); ati_remote 359 drivers/media/rc/ati_remote.c return ati_remote_open(ati_remote); ati_remote 364 drivers/media/rc/ati_remote.c struct ati_remote *ati_remote = input_get_drvdata(inputdev); ati_remote 365 drivers/media/rc/ati_remote.c ati_remote_close(ati_remote); ati_remote 370 drivers/media/rc/ati_remote.c struct ati_remote *ati_remote = rdev->priv; ati_remote 371 drivers/media/rc/ati_remote.c return ati_remote_open(ati_remote); ati_remote 376 drivers/media/rc/ati_remote.c struct ati_remote *ati_remote = rdev->priv; ati_remote 377 drivers/media/rc/ati_remote.c ati_remote_close(ati_remote); ati_remote 385 drivers/media/rc/ati_remote.c struct ati_remote *ati_remote = urb->context; ati_remote 388 drivers/media/rc/ati_remote.c dev_dbg(&ati_remote->interface->dev, "%s: status %d\n", ati_remote 393 drivers/media/rc/ati_remote.c ati_remote->send_flags |= SEND_FLAG_COMPLETE; ati_remote 395 drivers/media/rc/ati_remote.c wake_up(&ati_remote->wait); ati_remote 403 drivers/media/rc/ati_remote.c static int ati_remote_sendpacket(struct ati_remote *ati_remote, u16 cmd, ati_remote 409 drivers/media/rc/ati_remote.c memcpy(ati_remote->out_urb->transfer_buffer + 1, data, LO(cmd)); ati_remote 410 drivers/media/rc/ati_remote.c ((char *) ati_remote->out_urb->transfer_buffer)[0] = HI(cmd); ati_remote 412 drivers/media/rc/ati_remote.c ati_remote->out_urb->transfer_buffer_length = LO(cmd) + 1; ati_remote 413 drivers/media/rc/ati_remote.c ati_remote->out_urb->dev = ati_remote->udev; ati_remote 414 drivers/media/rc/ati_remote.c ati_remote->send_flags = SEND_FLAG_IN_PROGRESS; ati_remote 416 drivers/media/rc/ati_remote.c retval = usb_submit_urb(ati_remote->out_urb, GFP_ATOMIC); ati_remote 418 drivers/media/rc/ati_remote.c dev_dbg(&ati_remote->interface->dev, ati_remote 423 drivers/media/rc/ati_remote.c wait_event_timeout(ati_remote->wait, ati_remote 424 drivers/media/rc/ati_remote.c ((ati_remote->out_urb->status != -EINPROGRESS) || ati_remote 425 drivers/media/rc/ati_remote.c (ati_remote->send_flags & SEND_FLAG_COMPLETE)), ati_remote 427 drivers/media/rc/ati_remote.c usb_kill_urb(ati_remote->out_urb); ati_remote 456 drivers/media/rc/ati_remote.c static int ati_remote_compute_accel(struct ati_remote *ati_remote) ati_remote 463 drivers/media/rc/ati_remote.c if (time_after(now, ati_remote->old_jiffies + reset_time)) { ati_remote 464 drivers/media/rc/ati_remote.c ati_remote->acc_jiffies = now; ati_remote 470 drivers/media/rc/ati_remote.c if (time_before(now, ati_remote->acc_jiffies + timeout)) ati_remote 481 drivers/media/rc/ati_remote.c struct ati_remote *ati_remote = urb->context; ati_remote 482 drivers/media/rc/ati_remote.c unsigned char *data= ati_remote->inbuf; ati_remote 483 drivers/media/rc/ati_remote.c struct input_dev *dev = ati_remote->idev; ati_remote 506 drivers/media/rc/ati_remote.c dbginfo(&ati_remote->interface->dev, ati_remote 515 drivers/media/rc/ati_remote.c dbginfo(&ati_remote->interface->dev, ati_remote 527 drivers/media/rc/ati_remote.c dbginfo(&ati_remote->interface->dev, ati_remote 538 drivers/media/rc/ati_remote.c wheel_keycode = rc_g_keycode_from_table(ati_remote->rdev, ati_remote 564 drivers/media/rc/ati_remote.c ati_remote->old_jiffies = jiffies; ati_remote 570 drivers/media/rc/ati_remote.c if (ati_remote->old_data == data[2] && ati_remote 571 drivers/media/rc/ati_remote.c time_before(now, ati_remote->old_jiffies + ati_remote 573 drivers/media/rc/ati_remote.c ati_remote->repeat_count++; ati_remote 575 drivers/media/rc/ati_remote.c ati_remote->repeat_count = 0; ati_remote 576 drivers/media/rc/ati_remote.c ati_remote->first_jiffies = now; ati_remote 579 drivers/media/rc/ati_remote.c ati_remote->old_jiffies = now; ati_remote 585 drivers/media/rc/ati_remote.c if (ati_remote->repeat_count > 0 && ati_remote 586 drivers/media/rc/ati_remote.c (ati_remote->repeat_count < 5 || ati_remote 587 drivers/media/rc/ati_remote.c time_before(now, ati_remote->first_jiffies + ati_remote 615 drivers/media/rc/ati_remote.c rc_keydown_notimeout(ati_remote->rdev, ati_remote 618 drivers/media/rc/ati_remote.c rc_keyup(ati_remote->rdev); ati_remote 632 drivers/media/rc/ati_remote.c int acc = ati_remote_compute_accel(ati_remote); ati_remote 637 drivers/media/rc/ati_remote.c ati_remote->old_jiffies = jiffies; ati_remote 640 drivers/media/rc/ati_remote.c dev_dbg(&ati_remote->interface->dev, "ati_remote kind=%d\n", ati_remote 646 drivers/media/rc/ati_remote.c ati_remote->old_data = data[2]; ati_remote 654 drivers/media/rc/ati_remote.c struct ati_remote *ati_remote = urb->context; ati_remote 664 drivers/media/rc/ati_remote.c dev_dbg(&ati_remote->interface->dev, ati_remote 669 drivers/media/rc/ati_remote.c dev_dbg(&ati_remote->interface->dev, ati_remote 676 drivers/media/rc/ati_remote.c dev_err(&ati_remote->interface->dev, ati_remote 685 drivers/media/rc/ati_remote.c struct ati_remote *ati_remote) ati_remote 687 drivers/media/rc/ati_remote.c ati_remote->inbuf = usb_alloc_coherent(udev, DATA_BUFSIZE, GFP_ATOMIC, ati_remote 688 drivers/media/rc/ati_remote.c &ati_remote->inbuf_dma); ati_remote 689 drivers/media/rc/ati_remote.c if (!ati_remote->inbuf) ati_remote 692 drivers/media/rc/ati_remote.c ati_remote->outbuf = usb_alloc_coherent(udev, DATA_BUFSIZE, GFP_ATOMIC, ati_remote 693 drivers/media/rc/ati_remote.c &ati_remote->outbuf_dma); ati_remote 694 drivers/media/rc/ati_remote.c if (!ati_remote->outbuf) ati_remote 697 drivers/media/rc/ati_remote.c ati_remote->irq_urb = usb_alloc_urb(0, GFP_KERNEL); ati_remote 698 drivers/media/rc/ati_remote.c if (!ati_remote->irq_urb) ati_remote 701 drivers/media/rc/ati_remote.c ati_remote->out_urb = usb_alloc_urb(0, GFP_KERNEL); ati_remote 702 drivers/media/rc/ati_remote.c if (!ati_remote->out_urb) ati_remote 711 drivers/media/rc/ati_remote.c static void ati_remote_free_buffers(struct ati_remote *ati_remote) ati_remote 713 drivers/media/rc/ati_remote.c usb_free_urb(ati_remote->irq_urb); ati_remote 714 drivers/media/rc/ati_remote.c usb_free_urb(ati_remote->out_urb); ati_remote 716 drivers/media/rc/ati_remote.c usb_free_coherent(ati_remote->udev, DATA_BUFSIZE, ati_remote 717 drivers/media/rc/ati_remote.c ati_remote->inbuf, ati_remote->inbuf_dma); ati_remote 719 drivers/media/rc/ati_remote.c usb_free_coherent(ati_remote->udev, DATA_BUFSIZE, ati_remote 720 drivers/media/rc/ati_remote.c ati_remote->outbuf, ati_remote->outbuf_dma); ati_remote 723 drivers/media/rc/ati_remote.c static void ati_remote_input_init(struct ati_remote *ati_remote) ati_remote 725 drivers/media/rc/ati_remote.c struct input_dev *idev = ati_remote->idev; ati_remote 737 drivers/media/rc/ati_remote.c input_set_drvdata(idev, ati_remote); ati_remote 742 drivers/media/rc/ati_remote.c idev->name = ati_remote->mouse_name; ati_remote 743 drivers/media/rc/ati_remote.c idev->phys = ati_remote->mouse_phys; ati_remote 745 drivers/media/rc/ati_remote.c usb_to_input_id(ati_remote->udev, &idev->id); ati_remote 746 drivers/media/rc/ati_remote.c idev->dev.parent = &ati_remote->interface->dev; ati_remote 749 drivers/media/rc/ati_remote.c static void ati_remote_rc_init(struct ati_remote *ati_remote) ati_remote 751 drivers/media/rc/ati_remote.c struct rc_dev *rdev = ati_remote->rdev; ati_remote 753 drivers/media/rc/ati_remote.c rdev->priv = ati_remote; ati_remote 760 drivers/media/rc/ati_remote.c rdev->device_name = ati_remote->rc_name; ati_remote 761 drivers/media/rc/ati_remote.c rdev->input_phys = ati_remote->rc_phys; ati_remote 763 drivers/media/rc/ati_remote.c usb_to_input_id(ati_remote->udev, &rdev->input_id); ati_remote 764 drivers/media/rc/ati_remote.c rdev->dev.parent = &ati_remote->interface->dev; ati_remote 767 drivers/media/rc/ati_remote.c static int ati_remote_initialize(struct ati_remote *ati_remote) ati_remote 769 drivers/media/rc/ati_remote.c struct usb_device *udev = ati_remote->udev; ati_remote 772 drivers/media/rc/ati_remote.c init_waitqueue_head(&ati_remote->wait); ati_remote 775 drivers/media/rc/ati_remote.c pipe = usb_rcvintpipe(udev, ati_remote->endpoint_in->bEndpointAddress); ati_remote 779 drivers/media/rc/ati_remote.c usb_fill_int_urb(ati_remote->irq_urb, udev, pipe, ati_remote->inbuf, ati_remote 780 drivers/media/rc/ati_remote.c maxp, ati_remote_irq_in, ati_remote, ati_remote 781 drivers/media/rc/ati_remote.c ati_remote->endpoint_in->bInterval); ati_remote 782 drivers/media/rc/ati_remote.c ati_remote->irq_urb->transfer_dma = ati_remote->inbuf_dma; ati_remote 783 drivers/media/rc/ati_remote.c ati_remote->irq_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; ati_remote 786 drivers/media/rc/ati_remote.c pipe = usb_sndintpipe(udev, ati_remote->endpoint_out->bEndpointAddress); ati_remote 790 drivers/media/rc/ati_remote.c usb_fill_int_urb(ati_remote->out_urb, udev, pipe, ati_remote->outbuf, ati_remote 791 drivers/media/rc/ati_remote.c maxp, ati_remote_irq_out, ati_remote, ati_remote 792 drivers/media/rc/ati_remote.c ati_remote->endpoint_out->bInterval); ati_remote 793 drivers/media/rc/ati_remote.c ati_remote->out_urb->transfer_dma = ati_remote->outbuf_dma; ati_remote 794 drivers/media/rc/ati_remote.c ati_remote->out_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; ati_remote 797 drivers/media/rc/ati_remote.c if ((ati_remote_sendpacket(ati_remote, 0x8004, init1)) || ati_remote 798 drivers/media/rc/ati_remote.c (ati_remote_sendpacket(ati_remote, 0x8007, init2))) { ati_remote 799 drivers/media/rc/ati_remote.c dev_err(&ati_remote->interface->dev, ati_remote 817 drivers/media/rc/ati_remote.c struct ati_remote *ati_remote; ati_remote 839 drivers/media/rc/ati_remote.c ati_remote = kzalloc(sizeof (struct ati_remote), GFP_KERNEL); ati_remote 841 drivers/media/rc/ati_remote.c if (!ati_remote || !rc_dev) ati_remote 845 drivers/media/rc/ati_remote.c if (ati_remote_alloc_buffers(udev, ati_remote)) ati_remote 848 drivers/media/rc/ati_remote.c ati_remote->endpoint_in = endpoint_in; ati_remote 849 drivers/media/rc/ati_remote.c ati_remote->endpoint_out = endpoint_out; ati_remote 850 drivers/media/rc/ati_remote.c ati_remote->udev = udev; ati_remote 851 drivers/media/rc/ati_remote.c ati_remote->rdev = rc_dev; ati_remote 852 drivers/media/rc/ati_remote.c ati_remote->interface = interface; ati_remote 854 drivers/media/rc/ati_remote.c usb_make_path(udev, ati_remote->rc_phys, sizeof(ati_remote->rc_phys)); ati_remote 855 drivers/media/rc/ati_remote.c strscpy(ati_remote->mouse_phys, ati_remote->rc_phys, ati_remote 856 drivers/media/rc/ati_remote.c sizeof(ati_remote->mouse_phys)); ati_remote 858 drivers/media/rc/ati_remote.c strlcat(ati_remote->rc_phys, "/input0", sizeof(ati_remote->rc_phys)); ati_remote 859 drivers/media/rc/ati_remote.c strlcat(ati_remote->mouse_phys, "/input1", sizeof(ati_remote->mouse_phys)); ati_remote 861 drivers/media/rc/ati_remote.c snprintf(ati_remote->rc_name, sizeof(ati_remote->rc_name), "%s%s%s", ati_remote 866 drivers/media/rc/ati_remote.c if (!strlen(ati_remote->rc_name)) ati_remote 867 drivers/media/rc/ati_remote.c snprintf(ati_remote->rc_name, sizeof(ati_remote->rc_name), ati_remote 869 drivers/media/rc/ati_remote.c le16_to_cpu(ati_remote->udev->descriptor.idVendor), ati_remote 870 drivers/media/rc/ati_remote.c le16_to_cpu(ati_remote->udev->descriptor.idProduct)); ati_remote 872 drivers/media/rc/ati_remote.c snprintf(ati_remote->mouse_name, sizeof(ati_remote->mouse_name), ati_remote 873 drivers/media/rc/ati_remote.c "%s mouse", ati_remote->rc_name); ati_remote 885 drivers/media/rc/ati_remote.c ati_remote_rc_init(ati_remote); ati_remote 886 drivers/media/rc/ati_remote.c mutex_init(&ati_remote->open_mutex); ati_remote 889 drivers/media/rc/ati_remote.c err = ati_remote_initialize(ati_remote); ati_remote 894 drivers/media/rc/ati_remote.c err = rc_register_device(ati_remote->rdev); ati_remote 906 drivers/media/rc/ati_remote.c ati_remote->idev = input_dev; ati_remote 907 drivers/media/rc/ati_remote.c ati_remote_input_init(ati_remote); ati_remote 914 drivers/media/rc/ati_remote.c usb_set_intfdata(interface, ati_remote); ati_remote 923 drivers/media/rc/ati_remote.c usb_kill_urb(ati_remote->irq_urb); ati_remote 924 drivers/media/rc/ati_remote.c usb_kill_urb(ati_remote->out_urb); ati_remote 926 drivers/media/rc/ati_remote.c ati_remote_free_buffers(ati_remote); ati_remote 929 drivers/media/rc/ati_remote.c kfree(ati_remote); ati_remote 938 drivers/media/rc/ati_remote.c struct ati_remote *ati_remote; ati_remote 940 drivers/media/rc/ati_remote.c ati_remote = usb_get_intfdata(interface); ati_remote 942 drivers/media/rc/ati_remote.c if (!ati_remote) { ati_remote 947 drivers/media/rc/ati_remote.c usb_kill_urb(ati_remote->irq_urb); ati_remote 948 drivers/media/rc/ati_remote.c usb_kill_urb(ati_remote->out_urb); ati_remote 949 drivers/media/rc/ati_remote.c if (ati_remote->idev) ati_remote 950 drivers/media/rc/ati_remote.c input_unregister_device(ati_remote->idev); ati_remote 951 drivers/media/rc/ati_remote.c rc_unregister_device(ati_remote->rdev); ati_remote 952 drivers/media/rc/ati_remote.c ati_remote_free_buffers(ati_remote); ati_remote 953 drivers/media/rc/ati_remote.c kfree(ati_remote);