From patchwork Wed Sep 5 11:40:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amelie Delaunay X-Patchwork-Id: 10588791 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80C86139B for ; Wed, 5 Sep 2018 11:41:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FD182992E for ; Wed, 5 Sep 2018 11:41:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63E492993B; Wed, 5 Sep 2018 11:41:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08D792992E for ; Wed, 5 Sep 2018 11:41:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726219AbeIEQKU (ORCPT ); Wed, 5 Sep 2018 12:10:20 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:33134 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725868AbeIEQKU (ORCPT ); Wed, 5 Sep 2018 12:10:20 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w85BYEBW004130; Wed, 5 Sep 2018 13:40:23 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2m7g7wxh5t-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 05 Sep 2018 13:40:23 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 774C134; Wed, 5 Sep 2018 11:40:22 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 578372B7F; Wed, 5 Sep 2018 11:40:22 +0000 (GMT) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 5 Sep 2018 13:40:22 +0200 Received: from localhost (10.201.20.5) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 5 Sep 2018 13:40:21 +0200 From: Amelie Delaunay To: Minas Harutyunyan , Felipe Balbi , Greg Kroah-Hartman CC: , , , Fabrice Gasnier , Amelie Delaunay Subject: [PATCH 0/4] usb: dwc2: fix host mode external vbus supply management Date: Wed, 5 Sep 2018 13:40:01 +0200 Message-ID: <1536147605-26279-1-git-send-email-amelie.delaunay@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.201.20.5] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-05_07:,, signatures=0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset fixes and improves host mode external vbus supply management, mainly around suspend/resume use cases. It also avoid 'vbus regulator" to be requested lots of times upon each call to dwc2_vbus_supply_init(), especially when pm runtime is enabled. Fabrice Gasnier (4): usb: dwc2: get optional vbus-supply regulator once usb: dwc2: fix a race with external vbus supply usb: dwc2: fix call to vbus supply exit routine, call it unlocked usb: dwc2: fix unbalanced use of external vbus-supply drivers/usb/dwc2/hcd.c | 45 ++++++++++++++++++++++++++++++++++----------- drivers/usb/dwc2/platform.c | 8 ++++++++ 2 files changed, 42 insertions(+), 11 deletions(-) Tested-by: Artur Petrosyan Tested-by: Artur Petrosyan Acked-by: Minas Harutyunyan