• Home
  • Raw
  • Download

Lines Matching full:client

27 	struct host1x_client *client;  member
110 struct host1x_client *client) in host1x_subdev_register() argument
116 * and associate it with a client. At the same time, associate the in host1x_subdev_register()
117 * client with its parent device. in host1x_subdev_register()
121 list_move_tail(&client->list, &device->clients); in host1x_subdev_register()
123 client->host = &device->dev; in host1x_subdev_register()
124 subdev->client = client; in host1x_subdev_register()
140 struct host1x_client *client = subdev->client; in __host1x_subdev_unregister() local
158 subdev->client = NULL; in __host1x_subdev_unregister()
159 client->host = NULL; in __host1x_subdev_unregister()
166 * used to remove the subdevice when a client is unregistered but in __host1x_subdev_unregister()
169 list_del_init(&client->list); in __host1x_subdev_unregister()
187 * The client drivers access the subsystem specific driver data using the
193 struct host1x_client *client; in host1x_device_init() local
198 list_for_each_entry(client, &device->clients, list) { in host1x_device_init()
199 if (client->ops && client->ops->init) { in host1x_device_init()
200 err = client->ops->init(client); in host1x_device_init()
204 dev_name(client->dev), err); in host1x_device_init()
215 list_for_each_entry_continue_reverse(client, &device->clients, list) in host1x_device_init()
216 if (client->ops->exit) in host1x_device_init()
217 client->ops->exit(client); in host1x_device_init()
235 struct host1x_client *client; in host1x_device_exit() local
240 list_for_each_entry_reverse(client, &device->clients, list) { in host1x_device_exit()
241 if (client->ops && client->ops->exit) { in host1x_device_exit()
242 err = client->ops->exit(client); in host1x_device_exit()
246 dev_name(client->dev), err); in host1x_device_exit()
260 struct host1x_client *client) in host1x_add_client() argument
269 if (subdev->np == client->dev->of_node) { in host1x_add_client()
270 host1x_subdev_register(device, subdev, client); in host1x_add_client()
282 struct host1x_client *client) in host1x_del_client() argument
291 if (subdev->client == client) { in host1x_del_client()
363 struct host1x_client *client, *cl; in __host1x_device_del() local
370 * host1x_subdev_unregister() will remove the client from in __host1x_device_del()
374 * XXX: Alternatively, perhaps don't remove the client from in __host1x_device_del()
378 client = subdev->client; in __host1x_device_del()
382 /* add the client to the list of idle clients */ in __host1x_device_del()
384 list_add_tail(&client->list, &clients); in __host1x_device_del()
398 list_for_each_entry_safe(client, cl, &device->clients, list) in __host1x_device_del()
399 list_move_tail(&client->list, &clients); in __host1x_device_del()
419 struct host1x_client *client, *tmp; in host1x_device_add() local
460 list_for_each_entry_safe(client, tmp, &clients, list) { in host1x_device_add()
462 if (subdev->np == client->dev->of_node) { in host1x_device_add()
463 host1x_subdev_register(device, subdev, client); in host1x_device_add()
543 dev_name(subdev->client->dev)); in host1x_devices_show()
707 * __host1x_client_init() - initialize a host1x client
708 * @client: host1x client
709 * @key: lock class key for the client-specific mutex
711 void __host1x_client_init(struct host1x_client *client, struct lock_class_key *key) in __host1x_client_init() argument
713 INIT_LIST_HEAD(&client->list); in __host1x_client_init()
714 __mutex_init(&client->lock, "host1x client lock", key); in __host1x_client_init()
715 client->usecount = 0; in __host1x_client_init()
720 * host1x_client_exit() - uninitialize a host1x client
721 * @client: host1x client
723 void host1x_client_exit(struct host1x_client *client) in host1x_client_exit() argument
725 mutex_destroy(&client->lock); in host1x_client_exit()
730 * __host1x_client_register() - register a host1x client
731 * @client: host1x client
732 * @key: lock class key for the client-specific mutex
734 * Registers a host1x client with each host1x controller instance. Note that
735 * each client will only match their parent host1x controller and will only be
738 * device and call host1x_device_init(), which will in turn call each client's
741 int __host1x_client_register(struct host1x_client *client) in __host1x_client_register() argument
749 err = host1x_add_client(host1x, client); in __host1x_client_register()
759 list_add_tail(&client->list, &clients); in __host1x_client_register()
767 * host1x_client_unregister() - unregister a host1x client
768 * @client: host1x client
770 * Removes a host1x client from its host1x controller instance. If a logical
773 int host1x_client_unregister(struct host1x_client *client) in host1x_client_unregister() argument
782 err = host1x_del_client(host1x, client); in host1x_client_unregister()
793 if (c == client) { in host1x_client_unregister()
805 int host1x_client_suspend(struct host1x_client *client) in host1x_client_suspend() argument
809 mutex_lock(&client->lock); in host1x_client_suspend()
811 if (client->usecount == 1) { in host1x_client_suspend()
812 if (client->ops && client->ops->suspend) { in host1x_client_suspend()
813 err = client->ops->suspend(client); in host1x_client_suspend()
819 client->usecount--; in host1x_client_suspend()
820 dev_dbg(client->dev, "use count: %u\n", client->usecount); in host1x_client_suspend()
822 if (client->parent) { in host1x_client_suspend()
823 err = host1x_client_suspend(client->parent); in host1x_client_suspend()
831 if (client->usecount == 0) in host1x_client_suspend()
832 if (client->ops && client->ops->resume) in host1x_client_suspend()
833 client->ops->resume(client); in host1x_client_suspend()
835 client->usecount++; in host1x_client_suspend()
837 mutex_unlock(&client->lock); in host1x_client_suspend()
842 int host1x_client_resume(struct host1x_client *client) in host1x_client_resume() argument
846 mutex_lock(&client->lock); in host1x_client_resume()
848 if (client->parent) { in host1x_client_resume()
849 err = host1x_client_resume(client->parent); in host1x_client_resume()
854 if (client->usecount == 0) { in host1x_client_resume()
855 if (client->ops && client->ops->resume) { in host1x_client_resume()
856 err = client->ops->resume(client); in host1x_client_resume()
862 client->usecount++; in host1x_client_resume()
863 dev_dbg(client->dev, "use count: %u\n", client->usecount); in host1x_client_resume()
868 if (client->parent) in host1x_client_resume()
869 host1x_client_suspend(client->parent); in host1x_client_resume()
871 mutex_unlock(&client->lock); in host1x_client_resume()