Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2475822pxb; Tue, 13 Apr 2021 02:53:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw32ceS8ev/y61KR1tVpeBW70yDxXiABgf4NI1zvBOeEhcnrrBd6YyUiu26wTl0QOcassp/ X-Received: by 2002:a17:902:6ac3:b029:e6:c6a3:a697 with SMTP id i3-20020a1709026ac3b02900e6c6a3a697mr32288418plt.2.1618307624623; Tue, 13 Apr 2021 02:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618307624; cv=none; d=google.com; s=arc-20160816; b=cUVyFBobF8W1noOPgDj5bQlsiRFeoUUBRSrqCH6bCz2cGiNjjNlz716JcZtIAR9WXY sQGnikZA9rJvFIfktKJ8A/V+s0wl5kQZaxGa1yIfSHetxo9o+wREzkFyMISxkNj+99Bg 26GvgQaMuD+wQFutDU2e5M1nHSKdFPOmLe8JHDIQMVYK0tx0blycRARwPNowleVr20hx O47ISSrr8GXbQLzpzgEyUHw3R7vm0aasVa0Jf4Y24lszQP3XnePFwx2QnHYLXRwu+4ZX dTGFJidO15T2JHEFKZ9ow9wuN49dKCFlxfEh6J+Vdo3kskH69zuAhCajXZSE88d4byla 2d2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=/Fwu5RzA0J0NUnCwR9SJQg+h+H3PHRfLnER7tCl7tP4=; b=sUtL6upYeeg82KrxIDUQKt+moXkGGKLGMge3+sPQKX8EQM5OtMy+F6xIONweoAE6Ex Kc1tHsd+22ZyGrtGLf4Tr2ZxDJQ/WGAF4NpqsGHLXDzScTUWdNpnJJKjAfu+INn2uu1K apmQH67YUwsJF+4jXgKzpk0+vXwlrEvM+wjSvMjRUhS53Gd1N4okyJDw/XHlyQsuVB3v xloSJo0DT622gNu7vZa6CH08d2RB0C8bRvo052yogYPy5KTMKfGvQjpCsezmNUrZhdqn PIkiPXZGXXHI100VH3wsL1/4gXmgbXxA6ep7hdUbVCOHiWuF4KR9fiUa/Tj/Z4+8Kcit kJjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tfXAaOCi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si16446492plt.303.2021.04.13.02.53.32; Tue, 13 Apr 2021 02:53:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tfXAaOCi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239448AbhDMJaJ (ORCPT + 99 others); Tue, 13 Apr 2021 05:30:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230209AbhDMJaI (ORCPT ); Tue, 13 Apr 2021 05:30:08 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD91EC061574; Tue, 13 Apr 2021 02:29:48 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id w8so17743603lfr.0; Tue, 13 Apr 2021 02:29:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/Fwu5RzA0J0NUnCwR9SJQg+h+H3PHRfLnER7tCl7tP4=; b=tfXAaOCiS+4ZwYQg6GUozn1WXAwSYUWK4SPHuMpZkUUK1JUqlGW3W+S4Z9TbArVuzN hkEUS3LNCLyrS7R2TwiuVGlqBs15SvVoxzUkeFOe8uLtVuexjORBAYkrtONTJ0SO1sPs VN3OkyB5D2dB0hyO9ZQfrlr1LZSpKnwfVCO4r5mhVDaD9L2gitykgzj4HK/okmBcOvrS pSbmzPftGBpWVgx0kHml1pTcHyph7dLZ6v7I9bTxqgb6VczJ/gqbN+IKkGFqLToWho65 Sq9vD1tU36OC2Gx8KnGbr/s07qPDZDLzJenkqs4+lU7Zke7i1vsz7CAaFVeW+HuO7gmL 5L/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=/Fwu5RzA0J0NUnCwR9SJQg+h+H3PHRfLnER7tCl7tP4=; b=g2q6NMX7glww/b4VxQl6rVAd56anln5WOJgf/yTMSpEshjrowA12VmtMp2BY1uvB5r BvdlUz8OnU+MGWUA/gH8eBmleLgbXS1JKmvkgIodvNC7mZql0ASJ12wQe4AZQK7Zm4V7 dOT2a3blCpZax1nXvXM6Gj/fF6W8LNF69HPPCTKT6YFRcAeOyFgjaEBJKihIDMonsO0j +DtNkVfN9R3InP9eDUhmmwe2BKbQz6lP2TO0sAhxSECtegexc37UluaUeTrweuKQty9K 2DY4ODBpHPNDG+lQ5jDajBoyWgGQ2cJbhtEg+eEYZjgfxLIrpdvu2vrgIvs/bQhvQ5Ic IfAg== X-Gm-Message-State: AOAM530u7RT3i1D7AIdOzLiyzjet9NfV2x/gIhMrDWvW30MkpkK5zRGJ 32bYjdjoOjrr62bFdY8bWHU= X-Received: by 2002:ac2:58ed:: with SMTP id v13mr10561901lfo.166.1618306187193; Tue, 13 Apr 2021 02:29:47 -0700 (PDT) Received: from [192.168.1.100] ([178.176.76.152]) by smtp.gmail.com with ESMTPSA id i13sm111940lfe.14.2021.04.13.02.29.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Apr 2021 02:29:46 -0700 (PDT) Subject: Re: [PATCH v2 10/12] usb: dwc2: Add clock gating entering flow by system suspend To: Artur Petrosyan , Felipe Balbi , Greg Kroah-Hartman , Minas Harutyunyan , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: John Youn References: <20210413073716.30C13A0094@mailhost.synopsys.com> From: Sergei Shtylyov Organization: Brain-dead Software Message-ID: <45e520b4-b078-09b9-7082-eb3a35aa10bb@gmail.com> Date: Tue, 13 Apr 2021 12:29:41 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210413073716.30C13A0094@mailhost.synopsys.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13.04.2021 10:37, Artur Petrosyan wrote: > If not hibernation nor partial power down are supported, s/not/neither/? > clock gating is used to save power. > > Adds a new flow of entering clock gating when PC is > suspended. > > Signed-off-by: Artur Petrosyan > --- > Changes in v2: > - None > > drivers/usb/dwc2/hcd.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c > index 31d6a1b87228..09dcd37b9ef8 100644 > --- a/drivers/usb/dwc2/hcd.c > +++ b/drivers/usb/dwc2/hcd.c > @@ -4372,6 +4372,15 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd) > break; > case DWC2_POWER_DOWN_PARAM_HIBERNATION: > case DWC2_POWER_DOWN_PARAM_NONE: > + /* > + * If not hibernation nor partial power down are supported, s/not/neither/? > + * clock gating is used to save power. > + */ > + dwc2_host_enter_clock_gating(hsotg); > + > + /* After entering suspend, hardware is not accessible */ > + clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); > + break; > default: > goto skip_power_saving; > } MBR, Sergei