mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
PD: add sc2150A vendor patch
sc2150A vendor provide this patch for hard reset Change-Id: I8ccc17fd3aa95aa07354dff3443d1365ab715933 Signed-off-by: mahj8 <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/2193024 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Lu Chai <chailu1@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
56ee046b8d
commit
4573a6693a
2 changed files with 16 additions and 0 deletions
|
|
@ -161,7 +161,14 @@ void pe_snk_ready_entry(struct pd_port *pd_port)
|
|||
|
||||
void pe_snk_hard_reset_entry(struct pd_port *pd_port)
|
||||
{
|
||||
int rv = 0;
|
||||
uint32_t chip_id = 0;
|
||||
|
||||
pd_send_hard_reset(pd_port);
|
||||
rv = tcpci_get_chip_id(pd_port->tcpc, &chip_id);
|
||||
if (!rv && (SC2150A_DID == chip_id)) {
|
||||
pd_enable_timer(pd_port,PD_TIMER_HARD_RESET_COMPLETE);
|
||||
}
|
||||
}
|
||||
|
||||
void pe_snk_transition_to_default_entry(struct pd_port *pd_port)
|
||||
|
|
|
|||
|
|
@ -369,6 +369,8 @@ static inline void on_pe_timer_timeout(
|
|||
struct tcpc_device *tcpc, uint32_t timer_id)
|
||||
{
|
||||
struct pd_event pd_event = {0};
|
||||
int rv = 0;
|
||||
uint32_t chip_id = 0;
|
||||
|
||||
pd_event.event_type = PD_EVT_TIMER_MSG;
|
||||
pd_event.msg = timer_id;
|
||||
|
|
@ -426,6 +428,13 @@ static inline void on_pe_timer_timeout(
|
|||
pd_put_pe_event(&tcpc->pd_port, PD_PE_IDLE);
|
||||
break;
|
||||
|
||||
case PD_TIMER_HARD_RESET_COMPLETE:
|
||||
rv = tcpci_get_chip_id(tcpc, &chip_id);
|
||||
if (!rv && (SC2150A_DID == chip_id)) {
|
||||
pd_put_sent_hard_reset_event(tcpc);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
pd_put_event(tcpc, &pd_event, false);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue