mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
PD: PowerRole set to SINK when detected the analog_audio plug-in
TYPEC_SINK_AUDIO_ADAPTER ->set current_pr=PR_SINK ->enter_state_snk_startup->typec_set_pwr_role(will sent uevent) ->register and set /sys/class/typec/port0-partner/accessory_mode(analog_audio) Change-Id: I5aa26c83361739feec6e74a46c1ea23e48b0c0bf Signed-off-by: liuyc20 <liuyc20@lenovo.com> Reviewed-on: https://gerrit.mot.com/2734256 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Haijian Ma <mahj8@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
c6ae357961
commit
231e74b255
1 changed files with 3 additions and 0 deletions
|
|
@ -2650,6 +2650,8 @@ static void enter_state_snk_startup(struct usbpd *pd)
|
|||
memset(&pd->partner_identity, 0, sizeof(pd->partner_identity));
|
||||
pd->partner_desc.usb_pd = false;
|
||||
pd->partner_desc.accessory = TYPEC_ACCESSORY_NONE;
|
||||
if (pd->typec_mode == QTI_POWER_SUPPLY_TYPEC_SINK_AUDIO_ADAPTER)
|
||||
pd->partner_desc.accessory = TYPEC_ACCESSORY_AUDIO;
|
||||
pd->partner = typec_register_partner(pd->typec_port,
|
||||
&pd->partner_desc);
|
||||
}
|
||||
|
|
@ -3735,6 +3737,7 @@ static int usbpd_process_typec_mode(struct usbpd *pd,
|
|||
break;
|
||||
case QTI_POWER_SUPPLY_TYPEC_SINK_AUDIO_ADAPTER:
|
||||
usbpd_info(&pd->dev, "Type-C Analog Audio Adapter connected\n");
|
||||
pd->current_pr = PR_SINK;
|
||||
break;
|
||||
default:
|
||||
usbpd_warn(&pd->dev, "Unsupported typec mode:%d\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue