mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
usb: phy: snps: Enable autoresume for FS/HS peripherals only
Currently the driver enables autoresume for all the connected peripherals. In a case where an LS device is connected but fails the enumeration, this autoresume enablement is leading to PHY keeping the Dm pulled up even when the peripheral is detached. Hence, the detach hs_phy_irq is never fired and disconnect is not processed. Since remote wakeup from LS peripherals is not a requirement on our platforms, enable autoresume for FS/HS devices only. Change-Id: I0a62d08e58af18b523af322c64529f5183d55907 Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
This commit is contained in:
parent
fe6ad78765
commit
4ee28c3cb7
1 changed files with 4 additions and 5 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue