Lines Matching refs:host1x

287 static int host1x_add_client(struct host1x *host1x,  in host1x_add_client()  argument
293 mutex_lock(&host1x->devices_lock); in host1x_add_client()
295 list_for_each_entry(device, &host1x->devices, list) { in host1x_add_client()
299 mutex_unlock(&host1x->devices_lock); in host1x_add_client()
305 mutex_unlock(&host1x->devices_lock); in host1x_add_client()
309 static int host1x_del_client(struct host1x *host1x, in host1x_del_client() argument
315 mutex_lock(&host1x->devices_lock); in host1x_del_client()
317 list_for_each_entry_safe(device, dt, &host1x->devices, list) { in host1x_del_client()
321 mutex_unlock(&host1x->devices_lock); in host1x_del_client()
327 mutex_unlock(&host1x->devices_lock); in host1x_del_client()
421 static int host1x_device_add(struct host1x *host1x, in host1x_device_add() argument
443 device->dev.coherent_dma_mask = host1x->dev->coherent_dma_mask; in host1x_device_add()
448 device->dev.parent = host1x->dev; in host1x_device_add()
459 list_add_tail(&device->list, &host1x->devices); in host1x_device_add()
483 static void host1x_device_del(struct host1x *host1x, in host1x_device_del() argument
494 static void host1x_attach_driver(struct host1x *host1x, in host1x_attach_driver() argument
500 mutex_lock(&host1x->devices_lock); in host1x_attach_driver()
502 list_for_each_entry(device, &host1x->devices, list) { in host1x_attach_driver()
504 mutex_unlock(&host1x->devices_lock); in host1x_attach_driver()
509 err = host1x_device_add(host1x, driver); in host1x_attach_driver()
511 dev_err(host1x->dev, "failed to allocate device: %d\n", err); in host1x_attach_driver()
513 mutex_unlock(&host1x->devices_lock); in host1x_attach_driver()
516 static void host1x_detach_driver(struct host1x *host1x, in host1x_detach_driver() argument
521 mutex_lock(&host1x->devices_lock); in host1x_detach_driver()
523 list_for_each_entry_safe(device, tmp, &host1x->devices, list) in host1x_detach_driver()
525 host1x_device_del(host1x, device); in host1x_detach_driver()
527 mutex_unlock(&host1x->devices_lock); in host1x_detach_driver()
532 struct host1x *host1x = s->private; in host1x_devices_show() local
535 mutex_lock(&host1x->devices_lock); in host1x_devices_show()
537 list_for_each_entry(device, &host1x->devices, list) { in host1x_devices_show()
554 mutex_unlock(&host1x->devices_lock); in host1x_devices_show()
568 int host1x_register(struct host1x *host1x) in host1x_register() argument
573 list_add_tail(&host1x->list, &devices); in host1x_register()
579 host1x_attach_driver(host1x, driver); in host1x_register()
583 debugfs_create_file("devices", S_IRUGO, host1x->debugfs, host1x, in host1x_register()
596 int host1x_unregister(struct host1x *host1x) in host1x_unregister() argument
603 host1x_detach_driver(host1x, driver); in host1x_unregister()
608 list_del_init(&host1x->list); in host1x_unregister()
658 struct host1x *host1x; in host1x_driver_register_full() local
668 list_for_each_entry(host1x, &devices, list) in host1x_driver_register_full()
669 host1x_attach_driver(host1x, driver); in host1x_driver_register_full()
692 struct host1x *host1x; in host1x_driver_unregister() local
698 list_for_each_entry(host1x, &devices, list) in host1x_driver_unregister()
699 host1x_detach_driver(host1x, driver); in host1x_driver_unregister()
746 struct host1x *host1x; in __host1x_client_register() local
751 list_for_each_entry(host1x, &devices, list) { in __host1x_client_register()
752 err = host1x_add_client(host1x, client); in __host1x_client_register()
779 struct host1x *host1x; in host1x_client_unregister() local
784 list_for_each_entry(host1x, &devices, list) { in host1x_client_unregister()
785 err = host1x_del_client(host1x, client); in host1x_client_unregister()