blob: 5ce678dfec1abd462f8bd1b56a03475624bdbe79 [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;
Anna Perela83ca802013-05-13 15:11:23 +030026 struct usb_function *func;
Amit Blayf9b352b2013-03-04 15:01:40 +020027 struct usb_ep *in;
28 struct usb_ep *out;
29};
30
31void bam_data_disconnect(struct data_port *gr, u8 port_num);
32
33int bam_data_connect(struct data_port *gr, u8 port_num,
Shimrit Malichidbf43d72013-03-16 03:32:27 +020034 enum transport_type trans, u8 src_connection_idx,
35 u8 dst_connection_idx, enum function_type func);
Amit Blayf9b352b2013-03-04 15:01:40 +020036
37int bam_data_setup(unsigned int no_bam2bam_port);
38
39void bam_data_suspend(u8 port_num);
40
41void bam_data_resume(u8 port_num);
42
43#endif /* __U_BAM_DATA_H */