This change is to add all the possible i2c nodes for tcpc functions with the correct permission, due to the path may change with different android version.
Bug: 273391794
Test: limit 1.3A work when connect to Head Unit
Change-Id: Iefb44f37c5b42ae5579e928477efc927d270b724
Set mode, power role and data role when connected to non compliant
port partners.
Bug: 268584498
Change-Id: I6c3e7df09a61e26f3b976a86bd65cb646edd653d
Signed-off-by: Badhri Jagan Sridharan <badhri@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: I5ba45ebb11d265b843dfde21407bc5bab1d070c9
This change migrates IUsbGadget implementation to AIDL.
Bug: 261027750
Test: USB function switch success and AIDL service is running.
Change-Id: I7cc7070d875c26bc42f99aef84d5e5a41606223f
Signed-off-by: Ricky Niu <rickyniu@google.com>
This reverts commit bbcd013c41.
Reason for revert: Increase the boot time to cause the below bug.
b/261027750 | P0 | Broken test: v2/android-perfetto-dev-team/apct/perfetto/perfetto_integrationtests on git_master on oriole_hwasan-userdebug at 9355690
Change-Id: Idba7322ca86e70cf5d8e170936696586caa8c1c2
This change migrates IUsbGadget implementation to AIDL.
Bug: 218791946
Test: USB function switch success and AIDL service is running.
Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: Ib2cff64e75608572a005933bc94ecaf128b85559
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
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: 224699556
Test: dwc3 irq could be located in medium/big cores after USB function switch
Change-Id: Id993db9fc303e85a9a6337a0e41b1dfd6fc9a86a
Merged-In: Id993db9fc303e85a9a6337a0e41b1dfd6fc9a86a
(cherry picked from commit f363704a92fd7611cf01c8b3bcaf6e8913255207)
Since permission change in hal rc may be late, gadget
hal would enable USB function failed. The solution will
change the permission before USB gadget hal starts.
Bug: 224699556
Test: build pass and verified pass
Change-Id: I45c1318f647220480fa03ba3b813a81b21393d71
Merged-In: I45c1318f647220480fa03ba3b813a81b21393d71
(cherry picked from commit b30924e3599f2e92aeae498a6ae15d3b9a397930)
Implements limiting the source current when limitPowerTransfer
is invoked.
Bug: 200993386
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: Ia34dc127c1eb20254caa932db882e26e6092b945
kernel dev attribute has now been renamed from enable_usb
to move_data_to_usb. Update the same.
Bug: 211677613
Bug: 213312081
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I8e4aa0b2e09bfef807f0169eabb79e2fa2e4d2c7
Monitor google,pogo device attributes to report usb data status.
enableUsbDataWhileDocked now writes to enable_usb to enable USB-C
data while being docked.
Bug: 211677613
Bug: 213312081
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: Ie5c5d50c966ad9261cbf980c10909f04c4a757a0
Implements limiting the sink current current when limitPowerTransfer
is invoked.
Bug: 199357330
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I751a3912ebd159a536808897f878502418c6efdb
This change migrates IUsb implementation to AIDL.
Also, IUsb and IUsbGadget now run in its own processes
to improve stability and isolation.
Bug: 200993386
Bug: 199357330
Change-Id: I02753af4a41916b77ce110f9531504bf8c6a4691
Add vid/pid 04e8/6862 for dm condition in NCM
Test: The usb gadget functions work normally
Bug: 206565428
Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I04fba9fc137848d7f1c97a288bb12d76a613badc
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.
Bug: 161456198
Test: m
Merged-In: Iebc1c5d4c277e96cf7564d882aeecb084adc53ee
Change-Id: Iebc1c5d4c277e96cf7564d882aeecb084adc53ee
(cherry picked from commit 25368375b1759a13cacbfa1a9a183d4eee7381b2)
uwb needs ACM port, create this function combination.
Bug: 187877902
Test: ACM port can be enabled.
Signed-off-by: Puma Hsu <pumahsu@google.com>
Change-Id: I14c6af95bbd5e9e0b2c4a17a1fffb6e04def2c9b
Read duration stats expoted by google,usbc_port_cooling_dev and
push suez atom when the uevent is received. The plugged temperature
is queried every time when the USB port is connected. Maximum
temperature during overheat is queried when the uevent is received.
Bug: 193615568
Change-Id: Ib02e14dbdbe1390476e864d351158c1523a5c311
This among other things greatly increases tethering performance.
Bug: 185092876
Test: TreeHugger, built and booted on an oriole, enabled tethering
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic9f0b4bef05250bb38c91dc1e046366098d98dc0
Bug: 180711938
Test: HAL loaded and accessed attributes normally
Signed-off-by: Albert Wang <albertccwang@google.com>
Change-Id: Ic0399cfe7022cc1971fc99870d955b9308512ca8
This reverts commit 72ef08cafa.
Reason for revert: using alternate method for original behavior change
Bug: 187261232
Test: build pass
Change-Id: I5643a4109f6e4a64d167ed9ee1ce0bc3492cea42
Bug: 188078957
Test: Verified using temporary log messages to confirm
file paths are formed correctly as otherwise to test queryMoistureDetectionStatus()
requires some mock circuits.
Signed-off-by: Manish Varma <varmam@google.com>
Change-Id: If5402d5999c77bf5a3431c70d800e50570b87c88
Monitorffs needs to check the state of usb extcon to pull up
USB gadget. Therefore, this patch add state of usb extcon and
send this information to monitorffs.
Bug: 173086594
Test: verified pass
Change-Id: Ib2a1bb01813490185e1901fafdeba02458332e63
The flag "OLDER_GADGET" is no need.
Using "11110000.dwc3" be the udc name.
Test: Build Pass and boot to home
Bug: 177879761
Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I43c9e2815a6384c4dffdc47312fa0f372b34d9e9