Lines Matching refs:rc

15 #include <media/rc-core.h>
20 struct rc_dev *rc;
112 ir_raw_event_overflow(ir->rc);
134 if (ir_raw_event_store_with_filter(ir->rc, &rawir))
139 ir_raw_event_handle(ir->rc);
146 int rc;
169 rc = usb_submit_urb(urb, GFP_ATOMIC);
170 if (rc && rc != -ENODEV)
171 dev_warn(ir->dev, "failed to resubmit urb: %d\n", rc);
188 int rc;
193 rc = usb_submit_urb(ir->urb_out, GFP_KERNEL);
194 if (rc)
195 return rc;
200 return rc;
205 int rc;
218 rc = iguanair_send(ir, sizeof(ir->packet->header));
219 if (rc) {
226 rc = -ENODEV;
235 rc = iguanair_send(ir, sizeof(ir->packet->header));
236 if (rc) {
249 rc = iguanair_send(ir, sizeof(ir->packet->header));
250 if (rc)
253 return rc;
325 int rc;
333 rc = -EINVAL;
348 rc = iguanair_send(ir, sizeof(*ir->packet) + size);
350 if (rc == 0 && ir->tx_overflow)
351 rc = -EOVERFLOW;
354 return rc ? rc : count;
360 int rc;
362 rc = iguanair_receiver(ir, true);
363 if (rc == 0)
366 return rc;
372 int rc;
374 rc = iguanair_receiver(ir, false);
376 if (rc && rc != -ENODEV)
377 dev_warn(ir->dev, "failed to disable receiver: %d\n", rc);
385 struct rc_dev *rc;
394 rc = rc_allocate_device(RC_DRIVER_IR_RAW);
395 if (!ir || !rc) {
414 ir->rc = rc;
447 rc->device_name = ir->name;
448 rc->input_phys = ir->phys;
449 usb_to_input_id(ir->udev, &rc->input_id);
450 rc->dev.parent = &intf->dev;
451 rc->allowed_protocols = RC_PROTO_BIT_ALL_IR_DECODER;
452 rc->priv = ir;
453 rc->open = iguanair_open;
454 rc->close = iguanair_close;
455 rc->s_tx_mask = iguanair_set_tx_mask;
456 rc->s_tx_carrier = iguanair_set_tx_carrier;
457 rc->tx_ir = iguanair_tx;
458 rc->driver_name = KBUILD_MODNAME;
459 rc->map_name = RC_MAP_RC6_MCE;
460 rc->min_timeout = 1;
461 rc->timeout = IR_DEFAULT_TIMEOUT;
462 rc->max_timeout = 10 * IR_DEFAULT_TIMEOUT;
463 rc->rx_resolution = RX_RESOLUTION;
465 iguanair_set_tx_carrier(rc, 38000);
466 iguanair_set_tx_mask(rc, 0);
468 ret = rc_register_device(rc);
470 dev_err(&intf->dev, "failed to register rc device %d", ret);
488 rc_free_device(rc);
497 rc_unregister_device(ir->rc);
511 int rc = 0;
514 rc = iguanair_receiver(ir, false);
515 if (rc)
522 return rc;
528 int rc;
530 rc = usb_submit_urb(ir->urb_in, GFP_KERNEL);
531 if (rc)
532 dev_warn(&intf->dev, "failed to submit urb: %d\n", rc);
535 rc = iguanair_receiver(ir, true);
536 if (rc)
540 return rc;