Lines Matching refs:cport_id

365 gb_message_cport_pack(struct gb_operation_msg_hdr *header, u16 cport_id)  in gb_message_cport_pack()  argument
367 header->pad[0] = cport_id; in gb_message_cport_pack()
379 u16 cport_id = header->pad[0]; in gb_message_cport_unpack() local
383 return cport_id; in gb_message_cport_unpack()
390 static int message_send(struct gb_host_device *hd, u16 cport_id, in message_send() argument
405 if (!cport_id_valid(hd, cport_id)) { in message_send()
406 dev_err(&udev->dev, "invalid cport %u\n", cport_id); in message_send()
420 gb_message_cport_pack(message->header, cport_id); in message_send()
488 static int es2_cport_allocate(struct gb_host_device *hd, int cport_id, in es2_cport_allocate() argument
495 switch (cport_id) { in es2_cport_allocate()
498 dev_err(&hd->dev, "cport %d not available\n", cport_id); in es2_cport_allocate()
514 if (cport_id < 0) { in es2_cport_allocate()
517 } else if (cport_id < hd->num_cports) { in es2_cport_allocate()
518 ida_start = cport_id; in es2_cport_allocate()
519 ida_end = cport_id + 1; in es2_cport_allocate()
521 dev_err(&hd->dev, "cport %d not available\n", cport_id); in es2_cport_allocate()
528 static void es2_cport_release(struct gb_host_device *hd, u16 cport_id) in es2_cport_release() argument
532 switch (cport_id) { in es2_cport_release()
538 ida_simple_remove(&hd->cport_id_map, cport_id); in es2_cport_release()
541 static int cport_enable(struct gb_host_device *hd, u16 cport_id, in cport_enable() argument
563 cport_id, connection_flags); in cport_enable()
568 USB_RECIP_INTERFACE, cport_id, 0, in cport_enable()
572 cport_id); in cport_enable()
583 static int es2_cport_connected(struct gb_host_device *hd, u16 cport_id) in es2_cport_connected() argument
590 req.cport_id = cpu_to_le16(cport_id); in es2_cport_connected()
595 cport_id, ret); in es2_cport_connected()
602 static int es2_cport_flush(struct gb_host_device *hd, u16 cport_id) in es2_cport_flush() argument
609 req.cport_id = cpu_to_le16(cport_id); in es2_cport_flush()
613 dev_err(dev, "failed to flush cport %u: %d\n", cport_id, ret); in es2_cport_flush()
620 static int es2_cport_shutdown(struct gb_host_device *hd, u16 cport_id, in es2_cport_shutdown() argument
632 req.cport_id = cpu_to_le16(cport_id); in es2_cport_shutdown()
639 cport_id, ret, result); in es2_cport_shutdown()
646 static int es2_cport_quiesce(struct gb_host_device *hd, u16 cport_id, in es2_cport_quiesce() argument
661 req.cport_id = cpu_to_le16(cport_id); in es2_cport_quiesce()
668 cport_id, ret, result); in es2_cport_quiesce()
675 static int es2_cport_clear(struct gb_host_device *hd, u16 cport_id) in es2_cport_clear() argument
682 req.cport_id = cpu_to_le16(cport_id); in es2_cport_clear()
686 dev_err(dev, "failed to clear cport %u: %d\n", cport_id, ret); in es2_cport_clear()
693 static int latency_tag_enable(struct gb_host_device *hd, u16 cport_id) in latency_tag_enable() argument
702 USB_RECIP_INTERFACE, cport_id, 0, NULL, in latency_tag_enable()
707 cport_id); in latency_tag_enable()
711 static int latency_tag_disable(struct gb_host_device *hd, u16 cport_id) in latency_tag_disable() argument
720 USB_RECIP_INTERFACE, cport_id, 0, NULL, in latency_tag_disable()
725 cport_id); in latency_tag_disable()
820 u16 cport_id; in cport_in_callback() local
841 cport_id = gb_message_cport_unpack(header); in cport_in_callback()
843 if (cport_id_valid(hd, cport_id)) { in cport_in_callback()
844 greybus_data_rcvd(hd, cport_id, urb->transfer_buffer, in cport_in_callback()
847 dev_err(dev, "invalid cport id %u received\n", cport_id); in cport_in_callback()