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

Commit 1dfb4a81 authored by Jack Pham's avatar Jack Pham
Browse files

usb: gadget: Add snapshot of USB GSI function driver



This change adds USB GSI function driver which provides USB
RMNET/RNDIS/ECM/MBIM/DPL related functionalities with GSI hardware
accelerated path.

This snapshot is taken as of msm-4.9 commit 4f7918fd623f ("usb: f_gsi:
Use required RNDIS IAD descriptors with full speed descriptors").

Registering a misc device is discouraged, particularly when
MISC_DYNAMIC_MINOR is used as there are a limited (64) number
of dynamic minors available and can quickly exhaust. Convert
f_gsi's usage to struct cdev instead.

Change-Id: Ia6915c76deb084ebb789ae33c509e835502cfcf1
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent f5a93570
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -236,6 +236,9 @@ config USB_F_CDEV
config USB_F_CCID
	tristate

config USB_F_GSI
	tristate

config USB_F_QDSS
	tristate

@@ -576,6 +579,18 @@ config USB_CONFIGFS_F_CCID
	  allowing a userspace component to be able to provide the
	  implementation necessary to interface with the smartcard.

config USB_CONFIGFS_F_GSI
	bool "USB GSI function"
	select USB_F_GSI
	depends on USB_CONFIGFS
	help
	  The GSI function supports the IPA Generic Software Interface found
	  on various Qualcomm SoCs. This provides a hardware accelerated
	  datapath for various tethered data functions, such as RmNet, RNDIS,
	  MBIM, and CDC ECM. The function is configurable when instantiating
	  through ConfigFS. This driver can be used instead of the standard
	  implementations in case your hardware supports this.

config USB_CONFIGFS_F_QDSS
	bool "USB QDSS function"
	select USB_F_QDSS
+2 −0
Original line number Diff line number Diff line
@@ -64,5 +64,7 @@ usb_f_cdev-y := f_cdev.o
obj-$(CONFIG_USB_F_CDEV)	+= usb_f_cdev.o
usb_f_ccid-y			:= f_ccid.o
obj-$(CONFIG_USB_F_CCID)	+= usb_f_ccid.o
usb_f_gsi-y			:= f_gsi.o rndis.o
obj-$(CONFIG_USB_F_GSI)		+= usb_f_gsi.o
usb_f_qdss-y			:= f_qdss.o u_qdss.o
obj-$(CONFIG_USB_F_QDSS)	+= usb_f_qdss.o
+3304 −0

File added.

Preview size limit exceeded, changes collapsed.

+1409 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -232,6 +232,7 @@ struct usb_cdc_mbim_extended_desc {

#define USB_CDC_SEND_ENCAPSULATED_COMMAND	0x00
#define USB_CDC_GET_ENCAPSULATED_RESPONSE	0x01
#define USB_CDC_RESET_FUNCTION			0x05
#define USB_CDC_REQ_SET_LINE_CODING		0x20
#define USB_CDC_REQ_GET_LINE_CODING		0x21
#define USB_CDC_REQ_SET_CONTROL_LINE_STATE	0x22
Loading