summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Tso <kyletso@google.com>2023-03-24 10:55:20 +0800
committerKyle Tso <kyletso@google.com>2023-05-23 20:36:52 +0800
commit6f7ef4b68c722f80f72d92b161c79945acaeb227 (patch)
tree9287ffa87172459653e6c652d9ae15f00c97124f
parent9be9f481e040bd578aecd99723397b29b6fe1a02 (diff)
downloadtangorpro-6f7ef4b68c722f80f72d92b161c79945acaeb227.tar.gz
pogo_transport: Set data_active during transitioning to some states
This fix is for EVT2 only. When attaching to Pogo accessories while a USB-C device is attached, data_active is cleared in switch_to_hub_locked. Set it so that Type-C driver is able to callback to pogo_transport when the USB-C device is removed. Bug: 275001979 Change-Id: I62d4196d14a557b1ac3325afe6aef62650831bd5 Signed-off-by: Kyle Tso <kyletso@google.com> (cherry picked from commit 4f13dee6124f082d35c716bf969e179f3fbbc11c)
-rw-r--r--pogo/pogo_transport.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pogo/pogo_transport.c b/pogo/pogo_transport.c
index d1a5bdb..5eac95c 100644
--- a/pogo/pogo_transport.c
+++ b/pogo/pogo_transport.c
@@ -1591,6 +1591,11 @@ static void pogo_transport_hes_acc_detected(struct pogo_transport *pogo_transpor
case AUDIO_DIRECT:
pogo_transport_skip_acc_detection(pogo_transport);
switch_to_hub_locked(pogo_transport);
+ /*
+ * switch_to_hub_locked cleared data_active. Since there is still a USB-C
+ * accessory attached, set data_active.
+ */
+ chip->data_active = true;
pogo_transport_set_state(pogo_transport, ACC_DEVICE_HUB, 0);
break;
case DEVICE_HUB:
@@ -1769,6 +1774,10 @@ static void pogo_transport_acc_connected(struct pogo_transport *pogo_transport)
__func__, ret);
switch_to_hub_locked(pogo_transport);
+ /*
+ * switch_to_hub_locked cleared data_active. Since there is still a USB-C accessory
+ * attached, set data_active.
+ */
chip->data_active = true;
pogo_transport_set_state(pogo_transport, ACC_DEVICE_HUB, 0);
break;