13 Commits

Author SHA1 Message Date
Badhri Jagan Sridharan
d8314216e9 Set no_disconnect for ffs adb
no_disconnects flag defers disconnect till the actual descriptors
are written.

Bug: 72869030
Test: adb root with diag enabled succeeds on windows machine
Change-Id: I1a144a8d612bc2fd93fc72c4c40762257d52407f
2018-06-07 13:02:06 +00:00
Jerry Zhang
0c556bbbac Mount ptp separately from mtp
Ptp is now mounted in its own directory so the
mtp endpoint does not need to be closed to write
the ptp descriptors.

Bug: 72877174
Test: switch config to mtp/ptp
Change-Id: I9cec66eeb882fbf23851cdaf2e3906e8b3150b0a
2018-03-05 14:15:05 -08:00
Badhri Jagan Sridharan
5e309b9248 Usb Gadget hal implementation for wahoo
(cherry-pick of commit: e9af4669659c306a9c9b1a1ae3a1313a7631357d)

Bug: 63669128
Test: Tested USB gadget configurations and verified
that they enumerated.
Change-Id: If0f98697488f6c7cfe335d4c292acebaaba6c20f
2018-01-26 22:23:05 +00:00
Thierry Strudel
73878a0a97 RNDIS: expose as Wireless Controller device base class
RNDIS kernel driver will expose itself as
USB_CLASS_WIRELESS_CONTROLLER 0xe0, SubClass:01, Protocol:03
to work on Linux, MacOS and Windows.

Bug: 66725783
Change-Id: I8534dee9077e9f5a939d6964e4d25f9e4ad05d58
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2017-10-02 18:30:19 +00:00
Jerry Zhang
74ee24a5a4 Add OS Descriptors to MTP and PTP interfaces
Test: usb sniffer, verify descriptors are sent
Bug: 64790536
Change-Id: If138d74dafe72e1f7dc166b5dc83d4325b32ff4a
2017-09-08 10:46:24 -07:00
TreeHugger Robot
9f50e56a0d Merge "usb: add idVendor value for configfs" into oc-dr1-dev 2017-07-20 01:38:53 +00:00
seokjeong.hong
19bb7891bf usb: add idVendor value for configfs
From a qualcomm diag composition has idVendor 0x05c6,
the other Google USB composition change does not work properly
That's because this configfs.rc file change only idProduct.

Add Google's vendor id 0x18d1 to each composition.

Bug: 63056085

Change-Id: I2e45fe2176ad4601b23b33edeb5d6dbee5111242
Signed-off-by: seokjeong.hong <seokjeong.hong@lge.com>
2017-07-17 15:20:54 -07:00
Badhri Jagan Sridharan
82880d2bc2 usb: disable L1 LPM
NAK'ed OUT transfers never complete once the usb controller enters
L1 LPM. The issue was rootcaused to the usb controller not performing
remote wakeup when it enters L1 and a trasaction is queued.
Since, this is entirely controlled by controller's hardware,
disable L1 lpm to prevent transfer failure.

Also, init already has the required sepolicy to write to sysfs nodes.

Bug: 62038982
Test: Transfers happen with Broadwell chromebooks
Change-Id: Ibb13b5b79e1aa6a5d35ddcaffece4ef4942920b7
2017-07-17 20:17:11 +00:00
Jerry Zhang
3d68a0b40f Remove unused usb commands.
Property triggers duplicate functionality in
init.configfs.rc.

The ffs_aliases line is for android.c devices only.

Test: usb works.
Change-Id: Iae477f00671068a0628972feb69af7df1092c604
2017-04-26 14:32:43 -07:00
Jerry Zhang
284773d8db Enable MTP on functionfs for M/W/T.
Test: Use MTP.
Change-Id: I2979a0abbe22a5fe9a164a494ccc5e823ec69730
2017-04-26 14:29:19 -07:00
puma_hsu
f4e7a208e5 Using QCOM specific function word for Rndis
Bug:36113457
Change-Id: I1c0a27efc9f067619770180fce728e814889ef61
Signed-off-by: puma_hsu <puma_hsu@htc.com>
2017-03-17 14:47:06 -07:00
Badhri Jagan Sridharan
2882a4990a Set descriptor attributes to right values
bcdDevice and bcdUSB were set to incorrect values causing windows
machine's usb state machine to reset once after the initial exchange
of descriptors. This was causing an additional delay for the Android
device to show up as media device when configured in MTP mode.

Bug: 35857451
Test: Manually test mtp enumeration
Change-Id: Icd8ac8235ccfa70202a0601fc4ef56a158d3a2f3
2017-03-15 13:25:35 -07:00
Thierry Strudel
4e18dc435b Import common file from device specific directory
Test: boot, basic functionality
Change-Id: I9c07718b481730c3388f99c5e1eff17c9fd75a7b
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2017-03-04 23:34:45 -08:00