diff options
author | INSUN PYO <insun.pyo@samsung.com> | 2020-02-03 19:02:37 +0900 |
---|---|---|
committer | INSUN PYO <insun.pyo@samsung.com> | 2020-02-03 19:08:21 +0900 |
commit | 6ce11abea30a17fcdcc717feca390e4a0c4f52ca (patch) | |
tree | 7175b72ce8965c70bdb1e22e21ee8f8ec4042203 | |
parent | 9a571b90e16b68fdbe2cdcb7ec3ca6e14a1b8b3b (diff) | |
download | libdevice-node-6ce11abea30a17fcdcc717feca390e4a0c4f52ca.tar.gz libdevice-node-6ce11abea30a17fcdcc717feca390e4a0c4f52ca.tar.bz2 libdevice-node-6ce11abea30a17fcdcc717feca390e4a0c4f52ca.zip |
Extend USB gadget configuration for usb debug mode.submit/tizen/20200205.015759
In MCD user mode binary, sdb is disabled and mtp mode is only enabled.
When you enable debug mode(on Setting menu), both sdb is enabled.
As a result, sdb and mtp are enabled.
But, there were no configuration of SDB + MTP mode.
Device log at this situation.
//////////////////////////////////////////////////////////////////////
01-15 22:25:31.787 I/DEVICED (P 2608, T 2608): usb-debug.c: usb_debug_changed(64) > USB debug ON.
01-15 22:25:31.788 I/DEVICED (P 2608, T 2608): usb-debug.c: usb_debug_mode_changed(81) > Previous mode(1).
01-15 22:25:31.788 I/DEVICED (P 2608, T 2608): usb-debug.c: usb_debug_mode_changed(88) > New mode(5).
01-15 22:25:31.789 E/DEVICED (P 2608, T 2608): usb.c: usb_change_gadget(244) > Unable to translate id into gadget: -22
01-15 22:25:31.789 E/DEVICED (P 2608, T 2608): usb.c: usb_change_mode(332) > Failed to change gadget: -22
///////////////////////////////////////////////////////////////////////
Change-Id: Ic3f5420603b8ef02411ed429540542710415685b
-rw-r--r-- | hw/usb_gadget_common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/usb_gadget_common.c b/hw/usb_gadget_common.c index 7416790..0b79539 100644 --- a/hw/usb_gadget_common.c +++ b/hw/usb_gadget_common.c @@ -263,6 +263,14 @@ static int simple_id_to_gadget(struct usb_gadget_id *gadget_id, gadget->attrs.idProduct = 0x6860; break; + case USB_FUNCTION_MTP | USB_FUNCTION_SDB: + n_configs = 1; + functions[0][0] = USB_FUNCTION_MTP; + functions[0][1] = USB_FUNCTION_SDB; + functions[0][2] = 0; + gadget->attrs.idProduct = 0x6860; + break; + case USB_FUNCTION_MTP | USB_FUNCTION_ACM | USB_FUNCTION_SDB: n_configs = 1; functions[0][0] = USB_FUNCTION_MTP; |