From patchwork Thu Sep 20 13:49:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Petrosyan X-Patchwork-Id: 10607801 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 76BB96CB for ; Thu, 20 Sep 2018 13:49:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65D7D2D78F for ; Thu, 20 Sep 2018 13:49:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A0B62D7C3; Thu, 20 Sep 2018 13:49:35 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 37BAC2D78F for ; Thu, 20 Sep 2018 13:49:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732238AbeITTdH (ORCPT ); Thu, 20 Sep 2018 15:33:07 -0400 Received: from smtprelay.synopsys.com ([198.182.60.111]:48004 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbeITTdH (ORCPT ); Thu, 20 Sep 2018 15:33:07 -0400 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id D42E710C1038; Thu, 20 Sep 2018 06:49:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1537451372; bh=qnip6fklSCQnPHa/yq4Lzsdb4qgZFC18OKJbu6cISG8=; h=Date:From:Subject:To:CC:From; b=mVxw1OfnW4WRRRtQUW7ytruOVglUf5gRZYJFs1gU07Jp3lLZ3nC/ZIEH/WsgPOgoD qH+qgXGP/Uk2cLx+hjRrwSx1DYcOoXGIQEyuAkO9Ew41BN7pwYD6vh4IU+xgMIJ42l zsDska4xXi3PGa2HpofAKUk2PlTFT3LS087CN3y8fWHsqr+F7HeBzjLF3rYVF2g6sy PSrUe4JxgCInI+0Pk9LaNPTbOmGV/T+aT7kLamk6OcbwWr4Dv1PxCyY4Q1DVeFqKrV W1HTQqvTPegWJpNYRY2Xv2pr4Rf5OixcGNYRMfnUvZT4TdcLF+xsyOSqgZt6UI3rJU TY4a/kkrnwFkw== Received: from us01wehtc1.internal.synopsys.com (us01wehtc1-vip.internal.synopsys.com [10.12.239.236]) by mailhost.synopsys.com (Postfix) with ESMTP id A0AE133F1; Thu, 20 Sep 2018 06:49:32 -0700 (PDT) Received: from US01WEHTC3.internal.synopsys.com (10.15.84.232) by us01wehtc1.internal.synopsys.com (10.12.239.235) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 20 Sep 2018 06:49:31 -0700 Received: from arturp-ubuntu (10.13.184.20) by US01WEHTC3.internal.synopsys.com (10.15.84.231) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 20 Sep 2018 06:49:30 -0700 Received: by arturp-ubuntu (sSMTP sendmail emulation); Thu, 20 Sep 2018 09:49:26 -0400 Date: Thu, 20 Sep 2018 09:49:26 -0400 Message-ID: From: Artur Petrosyan Subject: [PATCH 0/3] usb: dwc2: Fix hibernation for switching between host and device modes. To: Felipe Balbi , Greg Kroah-Hartman , Minas Harutyunyan , CC: John Youn , Artur Petrosyan MIME-Version: 1.0 X-Originating-IP: [10.13.184.20] 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 patch set, fixes and improves hibernation flow. Mainly, fixes hibernation for switching between host and device modes. Adds enabling/disabling of power optimization parameter. Artur Petrosyan (3): usb: dwc2: Add default param to control power optimization. usb: dwc2: Update dwc2_handle_usb_suspend_intr function. usb: dwc2: Fix hibernation between host and device modes. drivers/usb/dwc2/core.h | 3 +++ drivers/usb/dwc2/core_intr.c | 32 ++++++++++++++++---------------- drivers/usb/dwc2/debugfs.c | 2 ++ drivers/usb/dwc2/hcd.c | 3 +++ drivers/usb/dwc2/params.c | 19 +++++++++++++------ 5 files changed, 37 insertions(+), 22 deletions(-)