Commit graph

11 commits

Author SHA1 Message Date
Ricky Niu
f14cbd6370 Add resetCb
Add the resetCb to complete asynchronous

Bug: 267252826
Test: Boot to home and function work
Change-Id: I9d6624cbe15c86c63e28f8f176d7c560aed8446f
2023-02-09 02:02:50 +00:00
Ricky Niu
5c7e338667 Fix up open bugs from gs201 AIDL migration
1. Remove unused group "wakelock".
2. Correct the right return value on setCurrentUsbFunctions.

Bug: 266694076
Test: Boot to home and function work
Change-Id: If0925a61e481e4deca560dc8dfc1be80a76c148f
2023-02-07 08:55:20 +00:00
Avichal Rakesh
72dbe87c42 UsbGadget: Add support for UVC function
UVC is a new USB function supported in Android. This CL adds UVC as a
valid function and gives it a new pid of 0x4ee[de]. UVC function is
guarded by the property `ro.usb.uvc.enabled`. When this property is set
to false, UVC won't be considered as a valid gadget function.

Bug: 242344221
Test: Manually tested that the UVC function is successfully configured
Change-Id: I7ce1cc192c09b5f3cd7c73405fe54426a1311dfb
2023-02-06 21:20:59 +00:00
Avichal Rakesh
9ba92eed60 Migrate IUsbGadget implementation to AIDL
This change migrates IUsbGadget implementation to AIDL.
Port of commit <d6d0b7d2ca5066988ee90889dccd00c06d64b694>.

Bug: 218791946
Test: USB function switch success and AIDL service is running.
Change-Id: I9613178d3cd2f9abd5396e4af763a257a8ef62a7
2023-01-26 20:18:09 +00:00
Ricky Niu
6d0bb7f43d usb: Correct the i2c path
Correct the I2C path to match the new memory address setting.

Test: Connect to HU work
Bug: 233996502

Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I27cca56698568e8a3060d9e40bad3a29ec072588
2022-05-30 03:06:56 +00:00
Ricky Niu
0eefbf303b usb: limit the current to 1.3A when connect to accessory am: e6cacbcff2
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs201/+/18527913

Change-Id: I33790e25c4d57d2af41492f2f263c8124ea2ebf3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 01:01:25 +00:00
Ricky Niu
e6cacbcff2 usb: limit the current to 1.3A when connect to accessory
For imporve USB stability, limit the current to 1.3A,
when connect to accessory.

Bug: 206635552
Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I2c1091aa7111e6242cc949923fbc86f27e54e976
2022-05-23 23:59:44 +00:00
Ray Chi
ee5795e850 usb: change function sequence if debug functions are enabled
On Windows platforms, wrong function sequnce will cause usb
driver installing not working. This patch will modify the
function sequence when debug functions are enabled.

Bug: 228800277
Test: tethering is working when debug functions are enabled.
Change-Id: I9f8b02354617b08a34fb4641ac710f32dabc643e
2022-04-14 03:59:15 +00:00
Ricky Niu
7d413565cd usb: Add dm condition in NCM
Add vid/pid 04e8/6862 for dm condition in NCM

Test: The usb gadget functions work normally
Bug: 226682477

Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I263f125d2ff961a6967b5b536c71fcbdcd87ed05
2022-03-25 10:34:56 +00:00
Ray Chi
f363704a92 tune usb irq (dwc3) in usb gadget hal
Since affinity permission is changed from root to system, original
permission change by script can't be used. Therefore, this patch
will move the functionality to usb gadget hal.

Bug: 220996010
Test: dwc3 irq could be located in medium/big cores after USB function switch
Change-Id: Id993db9fc303e85a9a6337a0e41b1dfd6fc9a86a
2022-03-07 07:45:50 +00:00
Badhri Jagan Sridharan
a1deb18dfb Migrate IUsb implementation to AIDL
Cherry-pick of <775523d1eb>

This change migrates IUsb implementation to AIDL.
Also, IUsb and IUsbGadget now run in its own processes
to improve stability and isolation.

Bug: 200993386
Change-Id: I02753af4a41916b77ce110f9531504bf8c6a4691
Merged-In: I02753af4a41916b77ce110f9531504bf8c6a4691
2022-03-01 03:32:23 +00:00
Renamed from usb/UsbGadget.cpp (Browse further)