Lines Matching refs:musb

86 	struct musb		*musb = s->private;  in musb_regdump_show()  local
90 pm_runtime_get_sync(musb->controller); in musb_regdump_show()
96 musb_readb(musb->mregs, musb_regmap[i].offset)); in musb_regdump_show()
100 musb_readw(musb->mregs, musb_regmap[i].offset)); in musb_regdump_show()
104 musb_readl(musb->mregs, musb_regmap[i].offset)); in musb_regdump_show()
109 pm_runtime_mark_last_busy(musb->controller); in musb_regdump_show()
110 pm_runtime_put_autosuspend(musb->controller); in musb_regdump_show()
117 struct musb *musb = s->private; in musb_test_mode_show() local
120 pm_runtime_get_sync(musb->controller); in musb_test_mode_show()
121 test = musb_readb(musb->mregs, MUSB_TESTMODE); in musb_test_mode_show()
122 pm_runtime_mark_last_busy(musb->controller); in musb_test_mode_show()
123 pm_runtime_put_autosuspend(musb->controller); in musb_test_mode_show()
167 struct musb *musb = s->private; in musb_test_mode_write() local
176 pm_runtime_get_sync(musb->controller); in musb_test_mode_write()
177 test = musb_readb(musb->mregs, MUSB_TESTMODE); in musb_test_mode_write()
179 dev_err(musb->controller, "Error: test mode is already set. " in musb_test_mode_write()
204 musb_load_testpacket(musb); in musb_test_mode_write()
216 musb_writeb(musb->mregs, MUSB_TESTMODE, test); in musb_test_mode_write()
219 pm_runtime_mark_last_busy(musb->controller); in musb_test_mode_write()
220 pm_runtime_put_autosuspend(musb->controller); in musb_test_mode_write()
234 struct musb *musb = s->private; in musb_softconnect_show() local
238 switch (musb_get_state(musb)) { in musb_softconnect_show()
241 pm_runtime_get_sync(musb->controller); in musb_softconnect_show()
243 reg = musb_readb(musb->mregs, MUSB_DEVCTL); in musb_softconnect_show()
246 pm_runtime_mark_last_busy(musb->controller); in musb_softconnect_show()
247 pm_runtime_put_autosuspend(musb->controller); in musb_softconnect_show()
267 struct musb *musb = s->private; in musb_softconnect_write() local
276 pm_runtime_get_sync(musb->controller); in musb_softconnect_write()
278 switch (musb_get_state(musb)) { in musb_softconnect_write()
280 musb_root_disconnect(musb); in musb_softconnect_write()
281 reg = musb_readb(musb->mregs, MUSB_DEVCTL); in musb_softconnect_write()
283 musb_writeb(musb->mregs, MUSB_DEVCTL, reg); in musb_softconnect_write()
289 switch (musb_get_state(musb)) { in musb_softconnect_write()
297 musb->context.devctl |= MUSB_DEVCTL_SESSION; in musb_softconnect_write()
298 reg = musb_readb(musb->mregs, MUSB_DEVCTL); in musb_softconnect_write()
300 musb_writeb(musb->mregs, MUSB_DEVCTL, reg); in musb_softconnect_write()
307 pm_runtime_mark_last_busy(musb->controller); in musb_softconnect_write()
308 pm_runtime_put_autosuspend(musb->controller); in musb_softconnect_write()
324 void musb_init_debugfs(struct musb *musb) in musb_init_debugfs() argument
328 root = debugfs_create_dir(dev_name(musb->controller), usb_debug_root); in musb_init_debugfs()
329 musb->debugfs_root = root; in musb_init_debugfs()
331 debugfs_create_file("regdump", S_IRUGO, root, musb, &musb_regdump_fops); in musb_init_debugfs()
332 debugfs_create_file("testmode", S_IRUGO | S_IWUSR, root, musb, in musb_init_debugfs()
334 debugfs_create_file("softconnect", S_IRUGO | S_IWUSR, root, musb, in musb_init_debugfs()
338 void /* __init_or_exit */ musb_exit_debugfs(struct musb *musb) in musb_exit_debugfs() argument
340 debugfs_remove_recursive(musb->debugfs_root); in musb_exit_debugfs()