mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
Merge "usb: phy: snps: Enable auto-resume during host mode bus suspend"
This commit is contained in:
commit
581a648da0
1 changed files with 17 additions and 9 deletions
|
|
@ -487,15 +487,23 @@ suspend:
|
|||
if (suspend) { /* Bus suspend */
|
||||
if (phy->cable_connected ||
|
||||
(phy->phy.flags & PHY_HOST_MODE)) {
|
||||
/* Enable auto-resume functionality by pulsing signal */
|
||||
msm_usb_write_readback(phy->base,
|
||||
USB2_PHY_USB_PHY_HS_PHY_CTRL2,
|
||||
USB2_AUTO_RESUME, USB2_AUTO_RESUME);
|
||||
usleep_range(500, 1000);
|
||||
msm_usb_write_readback(phy->base,
|
||||
USB2_PHY_USB_PHY_HS_PHY_CTRL2,
|
||||
USB2_AUTO_RESUME, 0);
|
||||
|
||||
/* Enable auto-resume functionality only when
|
||||
* there is some peripheral connected and real
|
||||
* bus suspend happened
|
||||
*/
|
||||
if ((phy->phy.flags & PHY_HSFS_MODE) ||
|
||||
(phy->phy.flags & PHY_LS_MODE)) {
|
||||
/* Enable auto-resume functionality by pulsing
|
||||
* signal
|
||||
*/
|
||||
msm_usb_write_readback(phy->base,
|
||||
USB2_PHY_USB_PHY_HS_PHY_CTRL2,
|
||||
USB2_AUTO_RESUME, USB2_AUTO_RESUME);
|
||||
usleep_range(500, 1000);
|
||||
msm_usb_write_readback(phy->base,
|
||||
USB2_PHY_USB_PHY_HS_PHY_CTRL2,
|
||||
USB2_AUTO_RESUME, 0);
|
||||
}
|
||||
msm_hsphy_enable_clocks(phy, false);
|
||||
} else {/* Cable disconnect */
|
||||
mutex_lock(&phy->phy_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue