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

Commit 4e8ce435 authored by Mayank Rana's avatar Mayank Rana
Browse files

usb: gadget: Add snapshot of USB CDEV function driver



This change adds USB CDEV function driver which creates USB character
device to provide DUN and NMEA functionality. This snapshot is taken
as of msm-4.4 commit 4195f84bde61 ("qcom-charger: smb2: add support
of PMFALCON").

It fixes couple of compilation errors as below:
1. usb_assign_descriptors() definition change
2. warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast] with usb_cser_alloc_chardev_region() API

It also fixes multiple warnings related to style and usage of unsigned.

Change-Id: I028e5fd23e88d5a247a3f217530d3263245c08d3
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 5c9280cd
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -224,6 +224,9 @@ config USB_F_ACC
config USB_F_DIAG
	tristate

config USB_F_CDEV
	tristate

# this first set of drivers all depend on bulk-capable hardware.

config USB_CONFIGFS
@@ -518,6 +521,13 @@ config USB_CONFIGFS_F_DIAG
	  Diag function driver enables support for Qualcomm diagnostics
	  port over USB.

config USB_CONFIGFS_F_CDEV
	bool "USB Serial Character function"
	select USB_F_CDEV
	depends on USB_CONFIGFS
	help
	  Generic USB serial character function driver to support DUN/NMEA.

choice
	tristate "USB Gadget Drivers"
	default USB_ETH
+2 −0
Original line number Diff line number Diff line
@@ -56,3 +56,5 @@ usb_f_accessory-y := f_accessory.o
obj-$(CONFIG_USB_F_ACC)         += usb_f_accessory.o
usb_f_diag-y			:= f_diag.o
obj-$(CONFIG_USB_F_DIAG)	+= usb_f_diag.o
usb_f_cdev-y			:= f_cdev.o
obj-$(CONFIG_USB_F_CDEV)	+= usb_f_cdev.o