mfd: fusb302: move notify to PD startup state

The PD policy would take 5-7s to enter PD disabled state (send
50 times caps, the more bytes of caps cmd, the more time it
takes), So we ough to pick usb notify to PD startup state for
better user experience.

Change-Id: I3b2dc1c5df31296520685ba57e892a30ef3c28aa
Signed-off-by: zain wang <wzz@rock-chips.com>
This commit is contained in:
zain wang
2017-05-19 15:24:33 +08:00
committed by Huang, Tao
parent 7b793ece1e
commit d672fca08d

View File

@@ -1396,7 +1396,7 @@ static void auto_vdm_machine(struct fusb30x_chip *chip, int evt)
static void fusb_state_disabled(struct fusb30x_chip *chip, int evt)
{
platform_fusb_notify(chip);
/* Do nothing */
}
static void fusb_state_unattached(struct fusb30x_chip *chip, int evt)
@@ -1532,6 +1532,7 @@ static void fusb_state_src_startup(struct fusb30x_chip *chip, int evt)
tcpm_set_rx_enable(chip, 1);
set_state(chip, policy_src_send_caps);
platform_fusb_notify(chip);
}
static void fusb_state_src_discovery(struct fusb30x_chip *chip, int evt)
@@ -1877,6 +1878,7 @@ static void fusb_state_snk_startup(struct fusb30x_chip *chip, int evt)
tcpm_set_polarity(chip, chip->cc_polarity);
tcpm_set_rx_enable(chip, 1);
set_state(chip, policy_snk_discovery);
platform_fusb_notify(chip);
}
static void fusb_state_snk_discovery(struct fusb30x_chip *chip, int evt)