Commit graph

10 commits

Author SHA1 Message Date
Amit Sunil Dhamne
e683802386 UsbGadget: Update SDP enum timeout when gadget is pulled up
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.

(ported from c5c5b127a7ed0db559d286284fe77b656bef6945)

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>
2023-09-19 13:45:30 -07:00
Avichal Rakesh
b75f286a74 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

Merged-In: I5c2040a84ee8360b16c955403478d908fe109121
Change-Id: I5c2040a84ee8360b16c955403478d908fe109121
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2023-09-06 20:51:36 +00:00
Chien Kun Niu
5bda84b517 usb: add all i2c number
Add all I2c number to change the permission

Bug: 273391794
Test: limit 1.3A work
Change-Id: Iefb44f37c5b42ae5579e928477efc927d270b724
2023-04-07 15:26:49 +08:00
Ricky Niu
704316d8ba 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
(cherry picked from commit 5c7e338667a7f21c27f5789c16a4781dcbbe8755)
2023-02-22 06:50:55 +00:00
Ricky Niu
400c1a9ca3 Add resetCb
Add the resetCb to complete asynchronous

Bug: 267252826
Test: Boot to home and function work
Change-Id: I9d6624cbe15c86c63e28f8f176d7c560aed8446f
(cherry picked from commit f14cbd637085145feff255b192a8031375fcdaa4)
2023-02-22 06:50:51 +00:00
Ricky Niu
1915b65459 Migrate IUsbGadget implementation to AIDL
This change migrates IUsbGadget implementation to AIDL.

Bug: 218791946
Test: USB function switch success and AIDL service is running.
Change-Id: I7cc7070d875c26bc42f99aef84d5e5a41606223f
Signed-off-by: Ricky Niu <rickyniu@google.com>
(cherry picked from aosp commit d6d0b7d2ca5066988ee90889dccd00c06d64b694)
2023-02-22 06:50:43 +00:00
Ricky Niu
4d736354f3 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
(cherry picked from commit e6cacbcff21d315763943469038c9ca8822a7f37)
2023-02-22 06:42:06 +00:00
Ray Chi
fbfb40d58c Modify dwc3 irq affinity to get better performance
Bug: 264946043
Test: build pass and dwc3 irq is located in expected cpu
Change-Id: Ia9ad880c64ae3122ab059a0cac9e7c6efe5950bb
2023-01-12 09:47:32 +00:00
Aaron Ding
66befd88e3 Create device Ripcurrent on Zuma platform
s/cloudripper/ripcurrent
s/gs201/zuma
s/pantah/ripcurrent

Bug: 229340586
Change-Id: Ic5dffbbfadbb1eb8479587b95222801426bba35e
Signed-off-by: Aaron Ding <aaronding@google.com>
2022-04-19 12:55:56 +08:00
Aaron Ding
d88f9a90bd Branch zuma from gs201
Branch zuma from gs201 sha1 9009acf5c217f553b45ea82aa0702607229f0347

cp/pantah/ripcurrent
cp/gs201/zuma

Bug: 229340586
Change-Id: Ia312c20dae892ead9bf06728b4ef5c0c260ad045
Signed-off-by: Aaron Ding <aaronding@google.com>
2022-04-19 12:45:55 +08:00