usbdev: support usb adb fastboot
Enable CONFIG_USBFASTBOOT to support fastboot driver. Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
parent
573317cada
commit
fb7c36978f
|
@ -596,6 +596,12 @@ menuconfig USBADB
|
|||
|
||||
if USBADB
|
||||
|
||||
config USBFASTBOOT
|
||||
bool "USB Android Debug Bridge (FASTBOOT) support"
|
||||
default n
|
||||
---help---
|
||||
Enables USB Android Debug Bridge (FASTBOOT) support
|
||||
|
||||
menuconfig USBADB_COMPOSITE
|
||||
bool "USBADB composite support"
|
||||
default n
|
||||
|
|
|
@ -48,7 +48,11 @@
|
|||
|
||||
/* FIXME use minor for char device npath */
|
||||
|
||||
#define USBADB_CHARDEV_PATH "/dev/adb0"
|
||||
#ifdef CONFIG_USBFASTBOOT
|
||||
# define USBADB_CHARDEV_PATH "/dev/fastboot"
|
||||
#else
|
||||
# define USBADB_CHARDEV_PATH "/dev/adb0"
|
||||
#endif
|
||||
|
||||
/* USB Controller */
|
||||
|
||||
|
@ -98,6 +102,12 @@
|
|||
|
||||
#define USBADB_NCONFIGS (1)
|
||||
|
||||
#ifdef CONFIG_USBFASTBOOT
|
||||
# define USBADB_INTERFACEPROTOCOL (3)
|
||||
#else
|
||||
# define USBADB_INTERFACEPROTOCOL (1)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
@ -209,7 +219,7 @@ static const struct usb_ifdesc_s g_adb_ifdesc =
|
|||
.neps = 2,
|
||||
.classid = USB_CLASS_VENDOR_SPEC,
|
||||
.subclass = 0x42,
|
||||
.protocol = 0x01,
|
||||
.protocol = USBADB_INTERFACEPROTOCOL,
|
||||
.iif = USBADB_INTERFACESTRID
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue