| /* |
| * Copyright (c) 2024 The Fuchsia Authors |
| * |
| * SPDX-License-Identifier: BSD-3-Clause |
| */ |
| |
| #include <linux/usb/gadget.h> |
| #include <linux/usb/composite.h> |
| |
| typedef void (*usb_req_cb)(struct usb_ep *ep, struct usb_request *req); |
| |
| struct f_fastboot { |
| struct usb_function usb_function; |
| |
| /* IN/OUT EP's and corresponding requests */ |
| struct usb_ep *in_ep, *out_ep; |
| struct usb_request *in_req, *out_req; |
| }; |
| |
| // `fastboot_func` contains USB IN/OUT EP's and the corresponding USB requests. |
| extern struct f_fastboot *fastboot_func; |
| |
| // Sets custom Fastboot USB completion callback. |
| int set_fastboot_usb_completion_cb(usb_req_cb out_req, usb_req_cb in_req); |
| |
| // Resets to default Fastboot USB completion callback. |
| void reset_fastboot_usb_completion_cb(void); |