Commit 2aa670b
Wang Jie
mfd: fusb302: fix dp detection error when increasing i2c frequency
If the timer_mux is started again after the N_DEBOUNCE_CNT+1 detection is completed,
the PD detection process may be mistakenly closed in the fusb_state_src_send_caps(),
resulting in failure to detect dp.
step1:
when fusb_state_attach_wait_source set conn_state to "attached_source", it will restart timer_mux_machine (1) with 2ms.
Many i2c communications go on. conn_state == policy_src_send_caps
step2:
policy_src_send_caps would wait timer_mux_machine (T_NO_RESPONSE) to disabled PD detection
until policy_send_data run succeed to close timer_mux_machine.
state_machine_typec()
static void fusb_state_src_send_caps(struct fusb30x_chip *chip, u32 evt)
switch (chip->sub_state) {
case 1:
tmp = policy_send_data(chip);
if (tmp == tx_success) {
....
chip->timer_mux = T_DISABLED; /* (2) close timer_mux */
}
....
default:
if (evt & EVENT_TIMER_MUX) {
....
set_state(chip, disabled); /* (3) just designed for T_NO_RESPONSE */
}
When (1) timerout event triggered before (2), it would mistakenly into (3).
solution:
The N_DEBOUNCE_CNT+1 test is complete, do not start the timer_mux again.
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Change-Id: I401ca594c875e8e5342b0e2cdfb602500c980a911 parent 5d21dac commit 2aa670b
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1692 | 1692 | | |
1693 | 1693 | | |
1694 | 1694 | | |
1695 | | - | |
1696 | 1695 | | |
| 1696 | + | |
1697 | 1697 | | |
1698 | 1698 | | |
1699 | 1699 | | |
| |||
0 commit comments