Commit graph

15 commits

Author SHA1 Message Date
RD Babiera
78f6294e38 Usb: shutdown old displayport poll thread when multiple start up
Better enforces that only one DisplayPort poll thread should be
active at once. If a new call to setup is made from additional
bind uevents before a disconnect occurs, tells the old thread
to shutdown and awaits signaling before a new worker thread spins
up.

Test: manual testing on device
Bug: 286593610
Change-Id: I1707970c500915fd4abb161d0b3a424bbb2bddca
2023-06-15 23:26:09 +00:00
Badhri Jagan Sridharan
574d046bd7 Usb: Check for displayport when booting
When booting check whether displayport driver has been probed and
signal hpd events as needed. Pin config and orientation needs to
be queried before signalling hpd.

Bug: 282223693
Change-Id: Iddb0921b363e49c41c0f6f635887b4daf4d19561
2023-06-15 23:23:01 +00:00
Badhri Jagan Sridharan
378b155ab6 Merge "Usb: Signal irq_hpd to drm stack" into udc-d1-dev 2023-05-25 19:46:52 +00:00
Badhri Jagan Sridharan
412f31194c Usb: Signal irq_hpd to drm stack
Monitor typec stack for irq_hpd events and signal irq_hpd when the
irq_hpd counter value read is not the same as the previously cached
value.

Bug: 278307874
Change-Id: Id4a72afcf85550cabbc2f9469bb0ccb92cd02ad2
2023-05-25 04:36:06 +00:00
Badhri Jagan Sridharan
47e1400c8f Usb: Populate UsbDataStatus only when not populated
Do not override UsbDataStatus when already populated.
Compliance warnings such as missing Rp do not populate
UsbDataStatus and the port partner is detected.
Populate UsbDataStatus only when not populated.

Bug: 279251052
Change-Id: Ibe71bdd5c521ba90c124d89bd56af90087c0df18
2023-05-16 05:51:50 +00:00
Badhri Jagan Sridharan
e707356f6a Usb: Set connected status when connected to non compliant port partners
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>
(cherry picked from commit 7c2d62aafc219af11252dabf49d84d84b7ccfa57)
2023-05-16 03:58:34 +00:00
RD Babiera
005049d207 Usb non-compliant port partner implementation
Adds vendor code for non-compliant charger feature. Currently
updates service version.

Minor port of  commit 96ccf93453583642a15dd96b1e4d6bf0645fc10b

Test: atest VtsAidlUsbTargetTest
Bug: 236322506
Change-Id: Ie1a48b1acaaae9a53f3b9bfebcfee7a2f4814810
(cherry picked from commit 96ccf93453583642a15dd96b1e4d6bf0645fc10b)
2023-05-16 03:58:30 +00:00
RD Babiera
4e29924d3d usb: Fix HAL build warnings related to DisplayPort
Adds proper error handling go-to points to remove warnings arising
from uninitialized variables, and removes unused
queryDisplayPortStatus() method.

Test: manual test on device, verify compiler warnings
Bug: 278951278
Change-Id: I54f7b710a0805b32c894d741e473d64814200134
2023-04-24 21:45:17 +00:00
RD Babiera
cc50d99508 usb: provide usb reference to DisplayPort shutdown thread
Passes usb object reference to thread creation of
mDisplayPortShutdownHelper so that it can properly call DisplayPort
shutdown method instead of calling on NULL reference.

Test: manual test on device
Bug: 278395605
Change-Id: Ie4dabb5e3ae9065f57cc0fbf2593fbe399097472
2023-04-17 22:43:31 +00:00
Treehugger Robot
5aa6158425 [conflict] Merge "usb: add all i2c number" into udc-d1-dev am: 6f1e1dca4a
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zuma/+/22122384

Change-Id: I0a4b28d87efdfeb7629d0c3a36fde232f45cc3ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-11 04:24:17 +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
RD Babiera
de0fc9d220 Port dp changes to drm sysfs
Write pin assignment, hpd, and orientation from type-c class to
drmdp platform device attributes using epoll when displayport
driver binds to device, and determine whether or not to shut down
epoll on displayport driver change uevents.

Test: manual testing with form factor device
Bug: 260915739
Change-Id: Iec9fc76166481a4611bb2fc023aea044b497f2c0
2023-04-03 22:16:17 +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
Badhri Jagan Sridharan
26f4504f16 Enable USB HAL
Fix up i2c address for typec and enable USB HAL.

Bug: 241871290
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I87ce763e350bfaec05dbe83ee040eda7d252e7a2
2022-08-27 02:42:21 +00: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