Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a9d403e authored by Swetha Chikkaboraiah's avatar Swetha Chikkaboraiah
Browse files

usb: gadget: Add snapshot of USB RMNET Function driver



This change adds USB RMNET function driver which allows communication
between USB BAM and IPA BAM for RMNET and DPL functionalities over USB.

This snapshot is taken as of msm-4.14 'commit 973e6f5c37fc (ARM: dts:
msm: support A/B OTA for LW.2.0 ")'.

This change adding changes to use cdev device instead of misc device
and also fixes different coding style related warnings.

Change-Id: I899cb02386c0ce63212989710ad2fe111da63ac8
Signed-off-by: default avatarSwetha Chikkaboraiah <schikk@codeaurora.org>
parent 5475cd6f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -71,5 +71,5 @@ usb_f_ptp-y := f_ptp.o
obj-$(CONFIG_USB_F_PTP)		+= usb_f_ptp.o
usb_f_qcrndis-y			:= f_qc_rndis.o u_data_ipa.o
obj-$(CONFIG_USB_F_QCRNDIS)	+= usb_f_qcrndis.o
usb_f_rmnet_bam-y               := f_rmnet.o u_ctrl_qti.o
usb_f_rmnet_bam-y               := f_rmnet.o u_ctrl_qti.o u_bam_dmux.o
obj-$(CONFIG_USB_F_RMNET_BAM)   += usb_f_rmnet_bam.o
+1723 −0

File added.

Preview size limit exceeded, changes collapsed.

+9 −22
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2011-2017, 2020, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2017, 2020-2021, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -23,7 +23,7 @@

enum bam_dmux_func_type {
	BAM_DMUX_FUNC_RMNET,
	BAM_DMUX_FUNC_MBIM,
	BAM_DMUX_FUNC_MBIM = 0,
	BAM_DMUX_FUNC_DPL,
	BAM_DMUX_NUM_FUNCS,
};
@@ -76,25 +76,12 @@ enum data_xport_type {
	NR_XPORT_TYPES
};

static inline int gbam_setup(enum bam_dmux_func_type func)
{
	return 0;
}

static inline void gbam_cleanup(enum bam_dmux_func_type func)
{
}

static inline int gbam_connect(struct data_port *gr,
		enum bam_dmux_func_type func)
{
	return 0;
}

static inline void gbam_disconnect(struct data_port *gr,
		enum bam_dmux_func_type func)
{
}
int gbam_connect(struct data_port *gr, enum bam_dmux_func_type func);
void gbam_disconnect(struct data_port *gr, enum bam_dmux_func_type func);
void gbam_cleanup(enum bam_dmux_func_type func);
int gbam_setup(enum bam_dmux_func_type func);
int gbam_mbim_connect(struct usb_gadget *g, struct usb_ep *in,
						struct usb_ep *out);

int gbam_mbim_connect(struct usb_gadget *g, struct usb_ep *in,
						struct usb_ep *out);