diff options
| author | Hemant Kumar <hemantk@codeaurora.org> | 2017-02-07 14:13:58 -0800 |
|---|---|---|
| committer | Hemant Kumar <hemantk@codeaurora.org> | 2017-02-07 15:13:13 -0800 |
| commit | 65719399a2b009eef4b80ac0bf384fc4bc80450c (patch) | |
| tree | d55f873006de44e6fbd61246d8607bb903d2e245 | |
| parent | 2aa89ab3ff59a788321bc6af782d639cfc8dab1f (diff) | |
usb: dwc3: Set core clk rate to default upon device remove notification
commit 1eec2157d84dcb ("usb: dwc3: Update core clock rate based on
USB port speed.") only sets clk rate for HS/FS/LS device add notification.
In case super speed device is plugged in after LS/FS/HS device unplug in
absence of runtime suspend, core clk rate remains at high speed core clk
rate. Fix this issue by setting the core clk rate back to default when
a device is being removed from root hub.
Change-Id: I0ac37b7ff08a9a297441304eb2cfaff398d44bb9
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
| -rw-r--r-- | drivers/usb/dwc3/dwc3-msm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c index 211e1945962c..623f3ce211aa 100644 --- a/drivers/usb/dwc3/dwc3-msm.c +++ b/drivers/usb/dwc3/dwc3-msm.c @@ -3281,6 +3281,11 @@ static int dwc3_msm_host_notifier(struct notifier_block *nb, pval.intval = 0; power_supply_set_property(mdwc->usb_psy, POWER_SUPPLY_PROP_BOOST_CURRENT, &pval); + + /* set rate back to default core clk rate */ + clk_set_rate(mdwc->core_clk, mdwc->core_clk_rate); + dev_dbg(mdwc->dev, "set core clk rate %ld\n", + mdwc->core_clk_rate); mdwc->max_rh_port_speed = USB_SPEED_UNKNOWN; } } |
