Lines Matching refs:ci

25 	struct ci_hdrc *ci = s->private;  in ci_device_show()  local
26 struct usb_gadget *gadget = &ci->gadget; in ci_device_show()
38 if (!ci->driver) in ci_device_show()
42 (ci->driver->function ? ci->driver->function : "")); in ci_device_show()
43 seq_printf(s, "gadget max speed = %d\n", ci->driver->max_speed); in ci_device_show()
65 struct ci_hdrc *ci = s->private; in ci_port_test_show() local
69 spin_lock_irqsave(&ci->lock, flags); in ci_port_test_show()
70 mode = hw_port_test_get(ci); in ci_port_test_show()
71 spin_unlock_irqrestore(&ci->lock, flags); in ci_port_test_show()
85 struct ci_hdrc *ci = s->private; in ci_port_test_write() local
101 spin_lock_irqsave(&ci->lock, flags); in ci_port_test_write()
102 ret = hw_port_test_set(ci, mode); in ci_port_test_write()
103 spin_unlock_irqrestore(&ci->lock, flags); in ci_port_test_write()
126 struct ci_hdrc *ci = s->private; in ci_qheads_show() local
130 if (ci->role != CI_ROLE_GADGET) { in ci_qheads_show()
135 spin_lock_irqsave(&ci->lock, flags); in ci_qheads_show()
136 for (i = 0; i < ci->hw_ep_max/2; i++) { in ci_qheads_show()
137 struct ci_hw_ep *hweprx = &ci->ci_hw_ep[i]; in ci_qheads_show()
139 &ci->ci_hw_ep[i + ci->hw_ep_max/2]; in ci_qheads_show()
147 spin_unlock_irqrestore(&ci->lock, flags); in ci_qheads_show()
169 struct ci_hdrc *ci = s->private; in ci_requests_show() local
176 if (ci->role != CI_ROLE_GADGET) { in ci_requests_show()
181 spin_lock_irqsave(&ci->lock, flags); in ci_requests_show()
182 for (i = 0; i < ci->hw_ep_max; i++) in ci_requests_show()
183 list_for_each(ptr, &ci->ci_hw_ep[i].qh.queue) { in ci_requests_show()
188 i % (ci->hw_ep_max / 2), in ci_requests_show()
190 ((i < ci->hw_ep_max/2) ? in ci_requests_show()
198 spin_unlock_irqrestore(&ci->lock, flags); in ci_requests_show()
217 struct ci_hdrc *ci = s->private; in ci_otg_show() local
220 if (!ci || !ci_otg_is_fsm_mode(ci)) in ci_otg_show()
223 fsm = &ci->fsm; in ci_otg_show()
227 usb_otg_state_string(ci->otg.state)); in ci_otg_show()
291 struct ci_hdrc *ci = s->private; in ci_role_show() local
293 seq_printf(s, "%s\n", ci_role(ci)->name); in ci_role_show()
302 struct ci_hdrc *ci = s->private; in ci_role_write() local
311 if (ci->roles[role] && in ci_role_write()
312 !strncmp(buf, ci->roles[role]->name, in ci_role_write()
313 strlen(ci->roles[role]->name))) in ci_role_write()
316 if (role == CI_ROLE_END || role == ci->role) in ci_role_write()
319 ci_role_stop(ci); in ci_role_write()
320 ret = ci_role_start(ci, role); in ci_role_write()
340 struct ci_hdrc *ci = s->private; in ci_registers_show() local
343 if (!ci || ci->in_lpm) in ci_registers_show()
347 tmp_reg = hw_read_intr_enable(ci); in ci_registers_show()
350 tmp_reg = hw_read_intr_status(ci); in ci_registers_show()
353 tmp_reg = hw_read(ci, OP_USBMODE, ~0); in ci_registers_show()
356 tmp_reg = hw_read(ci, OP_USBCMD, ~0); in ci_registers_show()
359 tmp_reg = hw_read(ci, OP_PORTSC, ~0); in ci_registers_show()
362 if (ci->is_otg) { in ci_registers_show()
363 tmp_reg = hw_read_otgsc(ci, ~0); in ci_registers_show()
388 int dbg_create_files(struct ci_hdrc *ci) in dbg_create_files() argument
392 ci->debugfs = debugfs_create_dir(dev_name(ci->dev), NULL); in dbg_create_files()
393 if (!ci->debugfs) in dbg_create_files()
396 dent = debugfs_create_file("device", S_IRUGO, ci->debugfs, ci, in dbg_create_files()
401 dent = debugfs_create_file("port_test", S_IRUGO | S_IWUSR, ci->debugfs, in dbg_create_files()
402 ci, &ci_port_test_fops); in dbg_create_files()
406 dent = debugfs_create_file("qheads", S_IRUGO, ci->debugfs, ci, in dbg_create_files()
411 dent = debugfs_create_file("requests", S_IRUGO, ci->debugfs, ci, in dbg_create_files()
416 if (ci_otg_is_fsm_mode(ci)) { in dbg_create_files()
417 dent = debugfs_create_file("otg", S_IRUGO, ci->debugfs, ci, in dbg_create_files()
423 dent = debugfs_create_file("role", S_IRUGO | S_IWUSR, ci->debugfs, ci, in dbg_create_files()
428 dent = debugfs_create_file("registers", S_IRUGO, ci->debugfs, ci, in dbg_create_files()
434 debugfs_remove_recursive(ci->debugfs); in dbg_create_files()
442 void dbg_remove_files(struct ci_hdrc *ci) in dbg_remove_files() argument
444 debugfs_remove_recursive(ci->debugfs); in dbg_remove_files()