Lines Matching refs:imon
13 struct imon { struct
29 static void imon_ir_data(struct imon *imon) in imon_ir_data() argument
32 u64 data = be64_to_cpup(imon->ir_buf); in imon_ir_data()
40 dev_dbg(imon->dev, "data: %*ph", 8, imon->ir_buf); in imon_ir_data()
63 dev_dbg(imon->dev, "%s: %d bits", in imon_ir_data()
66 ir_raw_event_store_with_filter(imon->rcdev, &rawir); in imon_ir_data()
74 if (packet_no == 0x0a && !imon->rcdev->idle) { in imon_ir_data()
75 ir_raw_event_set_idle(imon->rcdev, true); in imon_ir_data()
76 ir_raw_event_handle(imon->rcdev); in imon_ir_data()
82 struct imon *imon = urb->context; in imon_ir_rx() local
87 imon_ir_data(imon); in imon_ir_rx()
96 dev_dbg(imon->dev, "error: urb status = %d", urb->status); in imon_ir_rx()
102 dev_warn(imon->dev, "failed to resubmit urb: %d", ret); in imon_ir_rx()
112 struct imon *imon; in imon_probe() local
132 imon = devm_kmalloc(&intf->dev, sizeof(*imon), GFP_KERNEL); in imon_probe()
133 if (!imon) in imon_probe()
136 imon->ir_urb = usb_alloc_urb(0, GFP_KERNEL); in imon_probe()
137 if (!imon->ir_urb) in imon_probe()
140 imon->ir_buf = kmalloc(sizeof(__be64), GFP_KERNEL); in imon_probe()
141 if (!imon->ir_buf) { in imon_probe()
146 imon->dev = &intf->dev; in imon_probe()
147 usb_fill_int_urb(imon->ir_urb, udev, in imon_probe()
149 imon->ir_buf, sizeof(__be64), in imon_probe()
150 imon_ir_rx, imon, ir_ep->bInterval); in imon_probe()
158 usb_make_path(udev, imon->phys, sizeof(imon->phys)); in imon_probe()
162 rcdev->input_phys = imon->phys; in imon_probe()
168 rcdev->priv = imon; in imon_probe()
174 imon->rcdev = rcdev; in imon_probe()
176 ret = usb_submit_urb(imon->ir_urb, GFP_KERNEL); in imon_probe()
180 usb_set_intfdata(intf, imon); in imon_probe()
185 usb_free_urb(imon->ir_urb); in imon_probe()
186 kfree(imon->ir_buf); in imon_probe()
192 struct imon *imon = usb_get_intfdata(intf); in imon_disconnect() local
194 usb_kill_urb(imon->ir_urb); in imon_disconnect()
195 usb_free_urb(imon->ir_urb); in imon_disconnect()
196 kfree(imon->ir_buf); in imon_disconnect()