blob: 71a01b9cdb5cea494ffc377dd8a62f746dacd580 [file] [log] [blame]
Amit Blayf9b352b2013-03-04 15:01:40 +02001/* 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
18enum function_type {
19 USB_FUNC_ECM,
20 USB_FUNC_MBIM,
21 USB_FUNC_RNDIS,
22};
23
24struct data_port {
25 struct usb_composite_dev *cdev;
26 struct usb_ep *in;
27 struct usb_ep *out;
28};
29
30void bam_data_disconnect(struct data_port *gr, u8 port_num);
31
32int bam_data_connect(struct data_port *gr, u8 port_num,
33 enum transport_type trans, u8 connection_idx, enum function_type func);
34
35int bam_data_setup(unsigned int no_bam2bam_port);
36
37void bam_data_suspend(u8 port_num);
38
39void bam_data_resume(u8 port_num);
40
41#endif /* __U_BAM_DATA_H */