Merge "usb: phy: snps: Enable autoresume for FS/HS peripherals only"

This commit is contained in:
qctecmdr 2021-02-03 19:56:16 -08:00 • committed by Gerrit - the friendly Code Review server
commit d6a42214ab
2 changed files with 5 additions and 6 deletions

View file

@ -2666,7 +2666,7 @@ static void dwc3_set_phy_speed_flags(struct dwc3_msm *mdwc)
for (i = 0; i < num_ports; i++) {
reg = dwc3_msm_read_reg(mdwc->base,
USB3_PORTSC + i*0x10);
if (reg & PORT_PE) {
if (reg & PORT_CONNECT) {
if (DEV_HIGHSPEED(reg) || DEV_FULLSPEED(reg))
mdwc->hs_phy->flags |= PHY_HSFS_MODE;
else if (DEV_LOWSPEED(reg))

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/module.h>
@ -487,12 +487,11 @@ static int msm_hsphy_set_suspend(struct usb_phy *uphy, int suspend)
suspend:
if (suspend) { /* Bus suspend */
if (phy->cable_connected) {
/* Enable auto-resume functionality only during host
* mode bus suspend with some peripheral connected.
/* Enable auto-resume functionality during host mode
* bus suspend with some FS/HS peripheral connected.
*/
if ((phy->phy.flags & PHY_HOST_MODE) &&
((phy->phy.flags & PHY_HSFS_MODE) ||
(phy->phy.flags & PHY_LS_MODE))) {
(phy->phy.flags & PHY_HSFS_MODE)) {
/* Enable auto-resume functionality by pulsing
* signal
*/