The paths of sysfs nodes are different on multiple build targets and are
also different between the old kernel (5.10) and newer kernel (6.1).
Since usb HAL code is shared by those targets and different kernel
versions, Runtime search the correct paths.
Bug: 317946158
Change-Id: I676455145232fd71db1578bb7a9801fed7bb327f
Signed-off-by: Kyle Tso <kyletso@google.com>
Indicate to the kernel that the usb gadget is pulled up
by writing to `update_sdp_enum_timeout` sysfs node. Write
to this node will inform the kernel that it can lower the SDP
timeout alarm value which is used to detect an SDP port
vs a DCP.
Bug:275687235
Test: Check `update_sdp_enum_timeout` is written into after usb
gadget is pulled up. Verify that the alarm timeout lowers.
Change-Id: Id3ae7e7a20b236cec6604414a7f81860e868bdd0
Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
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
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
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
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
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
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
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
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
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