From patchwork Thu Sep 20 13:49:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Petrosyan X-Patchwork-Id: 10607803 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 1943C157B for ; Thu, 20 Sep 2018 13:49:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0851D2D7B6 for ; Thu, 20 Sep 2018 13:49:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F11AB2D7C4; Thu, 20 Sep 2018 13:49:40 +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 8019A2D7B6 for ; Thu, 20 Sep 2018 13:49:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731528AbeITTdO (ORCPT ); Thu, 20 Sep 2018 15:33:14 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:40898 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbeITTdO (ORCPT ); Thu, 20 Sep 2018 15:33:14 -0400 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id 0FC5524E127B; Thu, 20 Sep 2018 06:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1537451379; bh=OKs+KPfjw17ED1w5GEMjE7XxTnBQG/xlNZQSj7TIzek=; h=Date:In-Reply-To:References:From:Subject:To:CC:From; b=SjXViTl/HEt7ewXVQ7w3InswJnqgMbzRO9LsUK08xycz0hnX5yZXB/VV5WhuAt3c7 Bbi4g0ekuLxlx6Jel3N0WTYI7ZRYRmBMVnzq7yKks6Tc03jSmAkmZClwP6F7ULrIlk uidBmfUPV11SOCM2TAftP5HbLRVob0ZG1eaZu62bIe96IkqFMaPRquPZkISgUNYZIw IYo8FwfaEMYuPWe8HEZLi7RDHf2GU2XV82/DRq109K16N8jkx1GnOxbj0rUOsDixVa 6zzf0ml+6O4lW9mutXB/SdxsdjfXj+dHpgLTdI6v8h7zYth0FyZKEU8wF0ymUtpjhV C27JmMizpdaGA== Received: from US01WEHTC2.internal.synopsys.com (us01wehtc2.internal.synopsys.com [10.12.239.237]) by mailhost.synopsys.com (Postfix) with ESMTP id F1A2A3FE3; Thu, 20 Sep 2018 06:49:38 -0700 (PDT) Received: from US01WEHTC3.internal.synopsys.com (10.15.84.232) by US01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 20 Sep 2018 06:49:38 -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:37 -0700 Received: by arturp-ubuntu (sSMTP sendmail emulation); Thu, 20 Sep 2018 09:49:32 -0400 Date: Thu, 20 Sep 2018 09:49:32 -0400 Message-ID: <66bad10fd0f3ff939413981ae7c179f49a542501.1537451080.git.arturp@synopsys.com> In-Reply-To: References: From: Artur Petrosyan Subject: [PATCH 1/3] usb: dwc2: Add default param to control power optimization. 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 - Added a default param "power_saving" to enable or disable hibernation or partial power down features. - Printed hibernation param in hw_params_show and power_saving param in params_show. Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/core.h | 3 +++ drivers/usb/dwc2/debugfs.c | 2 ++ drivers/usb/dwc2/params.c | 19 +++++++++++++------ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index cc9c93affa14..2cf5e128cb75 100644 --- a/drivers/usb/dwc2/core.h +++ b/drivers/usb/dwc2/core.h @@ -373,6 +373,8 @@ enum dwc2_ep0_state { * case. * 0 - No (default) * 1 - Yes + * @power_saving: Specifies if power saving is enabled or not. If it is + * enabled power_down functionality will be enabled. * @power_down: Specifies whether the controller support power_down. * If power_down is enabled, the controller will enter * power_down in both peripheral and host mode when @@ -452,6 +454,7 @@ struct dwc2_core_params { bool uframe_sched; bool external_id_pin_ctl; + unsigned int power_saving:1; int power_down; #define DWC2_POWER_DOWN_PARAM_NONE 0 #define DWC2_POWER_DOWN_PARAM_PARTIAL 1 diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c index 22d015b0424f..9f663d42dfe8 100644 --- a/drivers/usb/dwc2/debugfs.c +++ b/drivers/usb/dwc2/debugfs.c @@ -695,6 +695,7 @@ static int params_show(struct seq_file *seq, void *v) print_param_hex(seq, p, ahbcfg); print_param(seq, p, uframe_sched); print_param(seq, p, external_id_pin_ctl); + print_param(seq, p, power_saving); print_param(seq, p, power_down); print_param(seq, p, lpm); print_param(seq, p, lpm_clock_gating); @@ -745,6 +746,7 @@ static int hw_params_show(struct seq_file *seq, void *v) print_param(seq, hw, num_dev_perio_in_ep); print_param(seq, hw, total_fifo_size); print_param(seq, hw, power_optimized); + print_param(seq, hw, hibernation); print_param(seq, hw, utmi_phy_data_width); print_param_hex(seq, hw, snpsid); print_param_hex(seq, hw, dev_ep_dirs); diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index bf7052e037d6..f51b3659511b 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -253,12 +253,18 @@ static void dwc2_set_param_power_down(struct dwc2_hsotg *hsotg) { int val; - if (hsotg->hw_params.hibernation) - val = 2; - else if (hsotg->hw_params.power_optimized) - val = 1; - else - val = 0; + if (!hsotg->params.power_saving) { + val = DWC2_POWER_DOWN_PARAM_NONE; + dev_dbg(hsotg->dev, "%s: Power saving is disabled.\n", + __func__); + } else { + if (hsotg->hw_params.hibernation) + val = DWC2_POWER_DOWN_PARAM_HIBERNATION; + else if (hsotg->hw_params.power_optimized) + val = DWC2_POWER_DOWN_PARAM_PARTIAL; + else + val = DWC2_POWER_DOWN_PARAM_NONE; + } hsotg->params.power_down = val; } @@ -280,6 +286,7 @@ static void dwc2_set_default_params(struct dwc2_hsotg *hsotg) dwc2_set_param_phy_type(hsotg); dwc2_set_param_speed(hsotg); dwc2_set_param_phy_utmi_width(hsotg); + p->power_saving = true; dwc2_set_param_power_down(hsotg); p->phy_ulpi_ddr = false; p->phy_ulpi_ext_vbus = false; From patchwork Thu Sep 20 13:49:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Petrosyan X-Patchwork-Id: 10607805 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 0ED89157B for ; Thu, 20 Sep 2018 13:49:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F33CD2D78F for ; Thu, 20 Sep 2018 13:49:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E65A72D7C3; Thu, 20 Sep 2018 13:49:46 +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 8227B2D78F for ; Thu, 20 Sep 2018 13:49:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732302AbeITTdU (ORCPT ); Thu, 20 Sep 2018 15:33:20 -0400 Received: from smtprelay.synopsys.com ([198.182.47.9]:40914 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbeITTdU (ORCPT ); Thu, 20 Sep 2018 15:33:20 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 6E22124E13D6; Thu, 20 Sep 2018 06:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1537451385; bh=PASe7hdOv0atv5RQchPDqhe6Fz0As4b+XMUhDOz2w2A=; h=Date:In-Reply-To:References:From:Subject:To:CC:From; b=Mne8Gngiusns+txpenfnJD55mpDEOeYDJRwINMI5ragUIHArhsthTORRHOGdITsl5 G8k3x+vE2Z+8tk2OR07rgS0W6zN0ELFPX0fYb7iSamQ5ifWX6QWwOoMg3YMsJDTenT aihR6l+ZIbW24eBA4LynEUr6W1v/7WsHnojtOtqbv5azDHZSP83XjQecsBDcN+TWkm HXxGyg/ElrW9nPmknwK6gmWv2jZmH8LpFB5IVdu2g46QSf6+ODSSvzcwQVrgkyy4ZM amad9DIPmXRbdMOcI0+fughnGNyufybkZTdFry/OXiTVwiUKHG/UipNty+13j4RXwv DQ3XsfoLpGeBg== Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id 5821057B9; Thu, 20 Sep 2018 06:49:45 -0700 (PDT) Received: from US01WEHTC3.internal.synopsys.com (10.15.84.232) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 20 Sep 2018 06:49:44 -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:43 -0700 Received: by arturp-ubuntu (sSMTP sendmail emulation); Thu, 20 Sep 2018 09:49:39 -0400 Date: Thu, 20 Sep 2018 09:49:39 -0400 Message-ID: <6016d1185adc9c939cabafbc8e6922063e0552c8.1537451080.git.arturp@synopsys.com> In-Reply-To: References: From: Artur Petrosyan Subject: [PATCH 2/3] usb: dwc2: Update dwc2_handle_usb_suspend_intr function. 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 To avoid working in two modes (partial power down and hibernation) changed conditions for entering partial power down or hibernation. Instead of checking hw_params.power_optimized and hw_params.hibernation now checking power_down param which already set to one of the options (Hibernation or Partial Power Down) based on OTG_EN_PWROPT. Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/core_intr.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c index 19ae2595f1c3..3602aca3316b 100644 --- a/drivers/usb/dwc2/core_intr.c +++ b/drivers/usb/dwc2/core_intr.c @@ -498,14 +498,15 @@ static void dwc2_handle_usb_suspend_intr(struct dwc2_hsotg *hsotg) return; } if (dsts & DSTS_SUSPSTS) { - if (hsotg->hw_params.power_optimized) { + switch (hsotg->params.power_down) { + case DWC2_POWER_DOWN_PARAM_PARTIAL: ret = dwc2_enter_partial_power_down(hsotg); if (ret) { if (ret != -ENOTSUPP) dev_err(hsotg->dev, "%s: enter partial_power_down failed\n", __func__); - goto skip_power_saving; + break; } udelay(100); @@ -513,16 +514,16 @@ static void dwc2_handle_usb_suspend_intr(struct dwc2_hsotg *hsotg) /* Ask phy to be suspended */ if (!IS_ERR_OR_NULL(hsotg->uphy)) usb_phy_set_suspend(hsotg->uphy, true); - } - - if (hsotg->hw_params.hibernation) { + break; + case DWC2_POWER_DOWN_PARAM_HIBERNATION: ret = dwc2_enter_hibernation(hsotg, 0); if (ret && ret != -ENOTSUPP) dev_err(hsotg->dev, "%s: enter hibernation failed\n", __func__); + break; } -skip_power_saving: + /* * Change to L2 (suspend) state before releasing * spinlock From patchwork Thu Sep 20 13:49:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Petrosyan X-Patchwork-Id: 10607807 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 4FBC66CB for ; Thu, 20 Sep 2018 13:49:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F4452D785 for ; Thu, 20 Sep 2018 13:49:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3394B2D7C3; Thu, 20 Sep 2018 13:49:53 +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 C88252D785 for ; Thu, 20 Sep 2018 13:49:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732393AbeITTd0 (ORCPT ); Thu, 20 Sep 2018 15:33:26 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:48030 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbeITTd0 (ORCPT ); Thu, 20 Sep 2018 15:33:26 -0400 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id D983110C1124; Thu, 20 Sep 2018 06:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1537451391; bh=f10tuhOH3rIt0eS7UJoFAV3ThlqtHqps6zt7womiBPg=; h=Date:In-Reply-To:References:From:Subject:To:CC:From; b=NkOhW+Yie3KUk7/+VNr4PNFHgYqetKe2IWJh4sq6RBQ7ua8fBD3s0TYcUfN7/NbkH 83RNZ/uor8QUa2QQ/CGDaY3k+PwWX1rr3xdeCtEh6YqjJFXo849ahYTwrhM/OS5pYQ mkySK06P1srGHu8ovWLT3LmsgB9MHl6zQi4Yu0kSHfHn3ffTpowQGli/3Ydor8MMtZ Kbnp6xAatLVtFpvyBG0nEjXTPpoWhGN2cP1GuyVlH/7QvUqU3AdekqpjiJ83bF91ge 5/YjkoW70gEJFOvmHnAKaac0CYwADIyRt2o8k9NLGFbLTWBvDtsTGz51encYdxMmBy dlQ5QVRvsY+XQ== Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id C112A3691; Thu, 20 Sep 2018 06:49:51 -0700 (PDT) Received: from US01WEHTC3.internal.synopsys.com (10.15.84.232) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 20 Sep 2018 06:49:51 -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:50 -0700 Received: by arturp-ubuntu (sSMTP sendmail emulation); Thu, 20 Sep 2018 09:49:45 -0400 Date: Thu, 20 Sep 2018 09:49:45 -0400 Message-ID: In-Reply-To: References: From: Artur Petrosyan Subject: [PATCH 3/3] usb: dwc2: Fix hibernation 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 - After entering hibernation both in host and device modes saved GPWRDN register. - In handling status change interrupt checking if current mode differs from the mode when entered hibernation. In case when mode is not changed, exiting device hibernation without remote wake up. On the other hand, if there is device hibernation and changed to host, then exiting hibernation for device mode with remote wake up. - Removed workaround for ignore suspend interrupt before enumeration. Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/core_intr.c | 19 +++++++++---------- drivers/usb/dwc2/hcd.c | 3 +++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c index 3602aca3316b..47e7dc4100af 100644 --- a/drivers/usb/dwc2/core_intr.c +++ b/drivers/usb/dwc2/core_intr.c @@ -491,12 +491,6 @@ static void dwc2_handle_usb_suspend_intr(struct dwc2_hsotg *hsotg) hsotg->hw_params.power_optimized, hsotg->hw_params.hibernation); - /* Ignore suspend request before enumeration */ - if (!dwc2_is_device_connected(hsotg)) { - dev_dbg(hsotg->dev, - "ignore suspend request before enumeration\n"); - return; - } if (dsts & DSTS_SUSPSTS) { switch (hsotg->params.power_down) { case DWC2_POWER_DOWN_PARAM_PARTIAL: @@ -733,21 +727,26 @@ static void dwc2_handle_gpwrdn_intr(struct dwc2_hsotg *hsotg) } } } + if ((gpwrdn & GPWRDN_RST_DET) && (gpwrdn & GPWRDN_RST_DET_MSK)) { dev_dbg(hsotg->dev, "%s: GPWRDN_RST_DET\n", __func__); if (!linestate && (gpwrdn & GPWRDN_BSESSVLD)) dwc2_exit_hibernation(hsotg, 0, 1, 0); } + if ((gpwrdn & GPWRDN_STS_CHGINT) && - (gpwrdn & GPWRDN_STS_CHGINT_MSK) && linestate) { + (gpwrdn & GPWRDN_STS_CHGINT_MSK)) { dev_dbg(hsotg->dev, "%s: GPWRDN_STS_CHGINT\n", __func__); if (hsotg->hw_params.hibernation && hsotg->hibernated) { - if (gpwrdn & GPWRDN_IDSTS) { + if ((gpwrdn & GPWRDN_IDSTS) & + (hsotg->gr_backup.gpwrdn & GPWRDN_IDSTS) && + linestate) { dwc2_exit_hibernation(hsotg, 0, 0, 0); call_gadget(hsotg, resume); - } else { - dwc2_exit_hibernation(hsotg, 1, 0, 1); + } else if (!(gpwrdn & GPWRDN_IDSTS) && !linestate) { + dwc2_exit_hibernation(hsotg, 1, 0, 0); + call_gadget(hsotg, resume); } } } diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 2bd6e6bfc241..0e29b4c4e87b 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -5582,6 +5582,9 @@ int dwc2_host_enter_hibernation(struct dwc2_hsotg *hsotg) gpwrdn |= GPWRDN_PWRDNSWTCH; dwc2_writel(hsotg, gpwrdn, GPWRDN); + /* Save gpwrdn register for further usage if stschng interrupt */ + hsotg->gr_backup.gpwrdn = dwc2_readl(hsotg, GPWRDN); + hsotg->hibernated = 1; hsotg->bus_suspended = 1; dev_dbg(hsotg->dev, "Host hibernation completed\n");