Lines Matching refs:hd
24 struct gb_host_device *hd = intf->hd; in gb_connection_cport_in_use() local
27 list_for_each_entry(connection, &hd->connections, hd_links) { in gb_connection_cport_in_use()
54 gb_connection_hd_find(struct gb_host_device *hd, u16 cport_id) in gb_connection_hd_find() argument
60 list_for_each_entry(connection, &hd->connections, hd_links) in gb_connection_hd_find()
76 void greybus_data_rcvd(struct gb_host_device *hd, u16 cport_id, in greybus_data_rcvd() argument
81 trace_gb_hd_in(hd); in greybus_data_rcvd()
83 connection = gb_connection_hd_find(hd, cport_id); in greybus_data_rcvd()
85 dev_err(&hd->dev, in greybus_data_rcvd()
144 _gb_connection_create(struct gb_host_device *hd, int hd_cport_id, in _gb_connection_create() argument
161 ret = gb_hd_cport_allocate(hd, hd_cport_id, flags); in _gb_connection_create()
163 dev_err(&hd->dev, "failed to allocate cport: %d\n", ret); in _gb_connection_create()
176 connection->hd = hd; in _gb_connection_create()
191 dev_name(&hd->dev), hd_cport_id); in _gb_connection_create()
202 list_add(&connection->hd_links, &hd->connections); in _gb_connection_create()
220 gb_hd_cport_release(hd, hd_cport_id); in _gb_connection_create()
228 gb_connection_create_static(struct gb_host_device *hd, u16 hd_cport_id, in gb_connection_create_static() argument
231 return _gb_connection_create(hd, hd_cport_id, NULL, NULL, 0, handler, in gb_connection_create_static()
238 return _gb_connection_create(intf->hd, -1, intf, NULL, 0, NULL, in gb_connection_create_control()
249 return _gb_connection_create(intf->hd, -1, intf, bundle, cport_id, in gb_connection_create()
264 return _gb_connection_create(intf->hd, -1, intf, bundle, cport_id, in gb_connection_create_flags()
281 struct gb_host_device *hd = connection->hd; in gb_connection_hd_cport_enable() local
284 if (!hd->driver->cport_enable) in gb_connection_hd_cport_enable()
287 ret = hd->driver->cport_enable(hd, connection->hd_cport_id, in gb_connection_hd_cport_enable()
290 dev_err(&hd->dev, "%s: failed to enable host cport: %d\n", in gb_connection_hd_cport_enable()
300 struct gb_host_device *hd = connection->hd; in gb_connection_hd_cport_disable() local
303 if (!hd->driver->cport_disable) in gb_connection_hd_cport_disable()
306 ret = hd->driver->cport_disable(hd, connection->hd_cport_id); in gb_connection_hd_cport_disable()
308 dev_err(&hd->dev, "%s: failed to disable host cport: %d\n", in gb_connection_hd_cport_disable()
315 struct gb_host_device *hd = connection->hd; in gb_connection_hd_cport_connected() local
318 if (!hd->driver->cport_connected) in gb_connection_hd_cport_connected()
321 ret = hd->driver->cport_connected(hd, connection->hd_cport_id); in gb_connection_hd_cport_connected()
323 dev_err(&hd->dev, "%s: failed to set connected state: %d\n", in gb_connection_hd_cport_connected()
333 struct gb_host_device *hd = connection->hd; in gb_connection_hd_cport_flush() local
336 if (!hd->driver->cport_flush) in gb_connection_hd_cport_flush()
339 ret = hd->driver->cport_flush(hd, connection->hd_cport_id); in gb_connection_hd_cport_flush()
341 dev_err(&hd->dev, "%s: failed to flush host cport: %d\n", in gb_connection_hd_cport_flush()
351 struct gb_host_device *hd = connection->hd; in gb_connection_hd_cport_quiesce() local
355 if (!hd->driver->cport_quiesce) in gb_connection_hd_cport_quiesce()
364 if (!hd->driver->cport_quiesce) in gb_connection_hd_cport_quiesce()
367 ret = hd->driver->cport_quiesce(hd, connection->hd_cport_id, in gb_connection_hd_cport_quiesce()
371 dev_err(&hd->dev, "%s: failed to quiesce host cport: %d\n", in gb_connection_hd_cport_quiesce()
381 struct gb_host_device *hd = connection->hd; in gb_connection_hd_cport_clear() local
384 if (!hd->driver->cport_clear) in gb_connection_hd_cport_clear()
387 ret = hd->driver->cport_clear(hd, connection->hd_cport_id); in gb_connection_hd_cport_clear()
389 dev_err(&hd->dev, "%s: failed to clear host cport: %d\n", in gb_connection_hd_cport_clear()
404 struct gb_host_device *hd = connection->hd; in gb_connection_svc_connection_create() local
425 ret = gb_svc_connection_create(hd->svc, in gb_connection_svc_connection_create()
426 hd->svc->ap_intf_id, in gb_connection_svc_connection_create()
432 dev_err(&connection->hd->dev, in gb_connection_svc_connection_create()
447 gb_svc_connection_destroy(connection->hd->svc, in gb_connection_svc_connection_destroy()
448 connection->hd->svc->ap_intf_id, in gb_connection_svc_connection_destroy()
493 dev_err(&connection->hd->dev, in gb_connection_control_disconnecting()
560 struct gb_host_device *hd = connection->hd; in gb_connection_cport_shutdown() local
561 const struct gb_hd_driver *drv = hd->driver; in gb_connection_cport_shutdown()
571 ret = drv->cport_shutdown(hd, connection->hd_cport_id, phase, in gb_connection_cport_shutdown()
578 dev_err(&hd->dev, "%s: failed to send cport shutdown (phase %d): %d\n", in gb_connection_cport_shutdown()
901 gb_hd_cport_release(connection->hd, connection->hd_cport_id); in gb_connection_destroy()
912 struct gb_host_device *hd = connection->hd; in gb_connection_latency_tag_enable() local
915 if (!hd->driver->latency_tag_enable) in gb_connection_latency_tag_enable()
918 ret = hd->driver->latency_tag_enable(hd, connection->hd_cport_id); in gb_connection_latency_tag_enable()
920 dev_err(&connection->hd->dev, in gb_connection_latency_tag_enable()
929 struct gb_host_device *hd = connection->hd; in gb_connection_latency_tag_disable() local
932 if (!hd->driver->latency_tag_disable) in gb_connection_latency_tag_disable()
935 ret = hd->driver->latency_tag_disable(hd, connection->hd_cport_id); in gb_connection_latency_tag_disable()
937 dev_err(&connection->hd->dev, in gb_connection_latency_tag_disable()