Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6a42214 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 0fd88e79 4ee28c3c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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))
+4 −5
Original line number Diff line number Diff line
// 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
				 */