fogona:fix USB typec cable can only recognize one side on both sides

Typec can be recognized on both sides, insert typec front and back
cat sys/class/tcpc/type_c_port0/cc_orientation returns CC1 and CC2 respectively

Change-Id: I6395d826b88d971ad385c31d8253b551afa914e0
Reviewed-on: https://gerrit.mot.com/2691695
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/2706214
Reviewed-by: <longc150@motorola.com>
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
This commit is contained in:
zgc 2023-08-10 13:43:02 +08:00 • committed by longc154
commit 0ece0109ba

View file

@ -304,6 +304,9 @@ static void aw35616_irq_work_handler(struct kthread_work *work)
aw35616_i2c_read_bits(chip, AW35616_REG_STATUS, chip->reg.status.byte, 2);
AW_LOG("plug_st = %d snk_det_rp_dbg = %d\n",
chip->reg.status.plug_st, chip->reg.status.snk_det_rp_dbg);
if(chip->reg.status.plug_ori > 0)
chip->tcpc->typec_polarity = chip->reg.status.plug_ori - 1;
AW_LOG("plug_ori = %d, tcpec_polarity = %d", chip->reg.status.plug_ori, chip->tcpc->typec_polarity);
switch (chip->reg.status.plug_st) {
case STANDBY:
AW_LOG("plug status not connected\n");