Lines Matching refs:hsi
118 static void hsi_scan_board_info(struct hsi_controller *hsi) in hsi_scan_board_info() argument
124 if (cl_info->info.hsi_id == hsi->id) { in hsi_scan_board_info()
125 p = hsi_find_port_num(hsi, cl_info->info.port); in hsi_scan_board_info()
343 struct hsi_controller *hsi = to_hsi_controller(dev); in hsi_controller_release() local
345 kfree(hsi->port); in hsi_controller_release()
346 kfree(hsi); in hsi_controller_release()
368 void hsi_unregister_controller(struct hsi_controller *hsi) in hsi_unregister_controller() argument
370 device_for_each_child(&hsi->device, NULL, hsi_remove_port); in hsi_unregister_controller()
371 device_unregister(&hsi->device); in hsi_unregister_controller()
381 int hsi_register_controller(struct hsi_controller *hsi) in hsi_register_controller() argument
386 err = device_add(&hsi->device); in hsi_register_controller()
389 for (i = 0; i < hsi->num_ports; i++) { in hsi_register_controller()
390 hsi->port[i]->device.parent = &hsi->device; in hsi_register_controller()
391 err = device_add(&hsi->port[i]->device); in hsi_register_controller()
396 hsi_scan_board_info(hsi); in hsi_register_controller()
401 device_del(&hsi->port[i]->device); in hsi_register_controller()
402 device_del(&hsi->device); in hsi_register_controller()
441 void hsi_put_controller(struct hsi_controller *hsi) in hsi_put_controller() argument
445 if (!hsi) in hsi_put_controller()
448 for (i = 0; i < hsi->num_ports; i++) in hsi_put_controller()
449 if (hsi->port && hsi->port[i]) in hsi_put_controller()
450 put_device(&hsi->port[i]->device); in hsi_put_controller()
451 put_device(&hsi->device); in hsi_put_controller()
464 struct hsi_controller *hsi; in hsi_alloc_controller() local
471 hsi = kzalloc(sizeof(*hsi), flags); in hsi_alloc_controller()
472 if (!hsi) in hsi_alloc_controller()
476 kfree(hsi); in hsi_alloc_controller()
479 hsi->num_ports = n_ports; in hsi_alloc_controller()
480 hsi->port = port; in hsi_alloc_controller()
481 hsi->device.release = hsi_controller_release; in hsi_alloc_controller()
482 device_initialize(&hsi->device); in hsi_alloc_controller()
498 hsi->port[i]->device.release = hsi_port_release; in hsi_alloc_controller()
499 device_initialize(&hsi->port[i]->device); in hsi_alloc_controller()
502 return hsi; in hsi_alloc_controller()
504 hsi_put_controller(hsi); in hsi_alloc_controller()