From d672fca08d26580dd3daf34f73c19e7e7e3dcec9 Mon Sep 17 00:00:00 2001 From: zain wang Date: Fri, 19 May 2017 15:24:33 +0800 Subject: [PATCH] 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 --- drivers/mfd/fusb302.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/fusb302.c b/drivers/mfd/fusb302.c index 62c4d0016ddc..087102d07df2 100644 --- a/drivers/mfd/fusb302.c +++ b/drivers/mfd/fusb302.c @@ -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) -- 2.34.1