Lines Matching refs:device

33 static ssize_t modalias_show(struct device *dev,  in modalias_show()
46 static int hsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env) in hsi_bus_uevent()
53 static int hsi_bus_match(struct device *dev, struct device_driver *driver) in hsi_bus_match()
71 static void hsi_client_release(struct device *dev) in hsi_client_release()
104 cl->device.bus = &hsi_bus_type; in hsi_new_client()
105 cl->device.parent = &port->device; in hsi_new_client()
106 cl->device.release = hsi_client_release; in hsi_new_client()
107 dev_set_name(&cl->device, "%s", info->name); in hsi_new_client()
108 cl->device.platform_data = info->platform_data; in hsi_new_client()
110 cl->device.archdata = *info->archdata; in hsi_new_client()
111 if (device_register(&cl->device) < 0) { in hsi_new_client()
113 put_device(&cl->device); in hsi_new_client()
216 dev_set_name(&cl->device, "%s", name); in hsi_add_client_from_dt()
295 cl->device.bus = &hsi_bus_type; in hsi_add_client_from_dt()
296 cl->device.parent = &port->device; in hsi_add_client_from_dt()
297 cl->device.release = hsi_client_release; in hsi_add_client_from_dt()
298 cl->device.of_node = client; in hsi_add_client_from_dt()
300 if (device_register(&cl->device) < 0) { in hsi_add_client_from_dt()
302 put_device(&cl->device); in hsi_add_client_from_dt()
330 int hsi_remove_client(struct device *dev, void *data __maybe_unused) in hsi_remove_client()
338 static int hsi_remove_port(struct device *dev, void *data __maybe_unused) in hsi_remove_port()
346 static void hsi_controller_release(struct device *dev) in hsi_controller_release()
354 static void hsi_port_release(struct device *dev) in hsi_port_release()
365 device_for_each_child(&port->device, NULL, hsi_remove_client); in hsi_port_unregister_clients()
375 device_for_each_child(&hsi->device, NULL, hsi_remove_port); in hsi_unregister_controller()
376 device_unregister(&hsi->device); in hsi_unregister_controller()
391 err = device_add(&hsi->device); in hsi_register_controller()
395 hsi->port[i]->device.parent = &hsi->device; in hsi_register_controller()
396 err = device_add(&hsi->port[i]->device); in hsi_register_controller()
406 device_del(&hsi->port[i]->device); in hsi_register_controller()
407 device_del(&hsi->device); in hsi_register_controller()
455 put_device(&hsi->port[i]->device); in hsi_put_controller()
456 put_device(&hsi->device); in hsi_put_controller()
486 hsi->device.release = hsi_controller_release; in hsi_alloc_controller()
487 device_initialize(&hsi->device); in hsi_alloc_controller()
502 dev_set_name(&port[i]->device, "port%d", i); in hsi_alloc_controller()
503 hsi->port[i]->device.release = hsi_port_release; in hsi_alloc_controller()
504 device_initialize(&hsi->port[i]->device); in hsi_alloc_controller()
613 if (!try_module_get(to_hsi_controller(port->device.parent)->owner)) { in hsi_claim_port()
644 module_put(to_hsi_controller(port->device.parent)->owner); in hsi_release_port()