blob: 2c42ee7e6ea6f957dd350812d1b88b504166ebc7 [file] [log] [blame]
Yecheng Zhao52b10d02024-04-04 09:34:15 -07001/*
2 * Copyright (c) 2024 The Fuchsia Authors
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <linux/usb/gadget.h>
8#include <linux/usb/composite.h>
9
10typedef void (*usb_req_cb)(struct usb_ep *ep, struct usb_request *req);
11
12struct f_fastboot {
13 struct usb_function usb_function;
14
15 /* IN/OUT EP's and corresponding requests */
16 struct usb_ep *in_ep, *out_ep;
17 struct usb_request *in_req, *out_req;
18};
19
20// `fastboot_func` contains USB IN/OUT EP's and the corresponding USB requests.
21extern struct f_fastboot *fastboot_func;
22
23// Sets custom Fastboot USB completion callback.
24int set_fastboot_usb_completion_cb(usb_req_cb out_req, usb_req_cb in_req);
25
26// Resets to default Fastboot USB completion callback.
27void reset_fastboot_usb_completion_cb(void);