Amit Blay | f9b352b | 2013-03-04 15:01:40 +0200 | [diff] [blame] | 1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef __U_BAM_DATA_H |
| 14 | #define __U_BAM_DATA_H |
| 15 | |
| 16 | #include <mach/usb_gadget_xport.h> |
| 17 | |
| 18 | enum function_type { |
| 19 | USB_FUNC_ECM, |
| 20 | USB_FUNC_MBIM, |
| 21 | USB_FUNC_RNDIS, |
| 22 | }; |
| 23 | |
| 24 | struct data_port { |
| 25 | struct usb_composite_dev *cdev; |
| 26 | struct usb_ep *in; |
| 27 | struct usb_ep *out; |
| 28 | }; |
| 29 | |
| 30 | void bam_data_disconnect(struct data_port *gr, u8 port_num); |
| 31 | |
| 32 | int bam_data_connect(struct data_port *gr, u8 port_num, |
| 33 | enum transport_type trans, u8 connection_idx, enum function_type func); |
| 34 | |
| 35 | int bam_data_setup(unsigned int no_bam2bam_port); |
| 36 | |
| 37 | void bam_data_suspend(u8 port_num); |
| 38 | |
| 39 | void bam_data_resume(u8 port_num); |
| 40 | |
| 41 | #endif /* __U_BAM_DATA_H */ |