xref: /wlan-dirver/qca-wifi-host-cmn/hif/src/dispatcher/usb_api.h (revision c8e2987f9325baadee03d0265544a08c4a0217b0)
1 /*
2  * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 #ifndef _USB_API_H_
19 #define _USB_API_H_
20 #include "if_usb.h"
21 
22 QDF_STATUS hif_usb_open(struct hif_softc *hif_ctx,
23 			 enum qdf_bus_type bus_type);
24 void hif_usb_close(struct hif_softc *hif_ctx);
25 
26 
27 void hif_usb_disable_isr(struct hif_softc *hif_ctx);
28 void hif_usb_nointrs(struct hif_softc *scn);
29 QDF_STATUS hif_usb_enable_bus(struct hif_softc *ol_sc,
30 			  struct device *dev, void *bdev,
31 			  const struct hif_bus_id *bid,
32 			  enum hif_enable_type type);
33 void hif_usb_disable_bus(struct hif_softc *scn);
34 int hif_usb_bus_configure(struct hif_softc *scn);
35 void hif_usb_irq_disable(struct hif_softc *scn, int ce_id);
36 void hif_usb_irq_enable(struct hif_softc *scn, int ce_id);
37 int hif_usb_dump_registers(struct hif_softc *scn);
38 int hif_usb_bus_suspend(struct hif_softc *hif_ctx);
39 int hif_usb_bus_resume(struct hif_softc *hif_ctx);
40 void hif_usb_stop_device(struct hif_softc *hif_sc);
41 void hif_usb_shutdown_bus_device(struct hif_softc *scn);
42 int hif_usb_bus_reset_resume(struct hif_softc *hif_ctx);
43 void hif_usb_set_bundle_mode(struct hif_softc *scn,
44 			     bool enabled, int rx_bundle_cnt);
45 void hif_usb_reg_tbl_attach(struct hif_softc *scn);
46 void hif_fw_assert_ramdump_pattern(struct hif_usb_softc *sc);
47 void hif_usb_ramdump_handler(struct hif_opaque_softc *scn);
48 bool hif_usb_needs_bmi(struct hif_softc *scn);
49 #endif /*_USB_API_H_*/
50