From patchwork Mon Aug 31 15:39:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 52895 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 2C0362127E for ; Mon, 31 Aug 2015 15:40:04 +0000 (UTC) Received: by lbcli1 with SMTP id li1sf39329620lbc.2 for ; Mon, 31 Aug 2015 08:40:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=/GFlo0TWlxEX1q4Bh8ruuVxSzwWCDCWWgVlj8vrzRHY=; b=DZ/37QRBu6KzNOSRdAlfiELZQWDgKad8Onx/c3RzStm6+371+vhSly9kEz9dynOkR2 G1v+V4A3i9+AOR46nOEzK/6ymJHaOtWS3wjBWln9k+k7xNf8DML1mgHqom3Hmf3IJvIk 7mafMeXDSIVQrAWeNqR3tCRH85K7LJpyw1+eRFkss+nye8RYKpR7eGQkpg/1dsUzXiWF mHnnE2ksJAqr8sRUHf8qhJaRZQdx/C59I4Yq0SPweGTHEi63TQVkJ9MwHg19V+SbWUOX o2H/ZWzPBXaKNIjFsehNg9xw9Lfu0Y7zAablm9fmlL9uskD6b8RW1t1+BvqlrH/uDKLu 0IdA== X-Gm-Message-State: ALoCoQlq8ubOxOpjt+JVdZbXWQxBRwRUiF2JjcM+3wksmNFuPLFbB41MpCQJrjxJ3W1HVuJA73ch X-Received: by 10.152.1.164 with SMTP id 4mr6425259lan.2.1441035603090; Mon, 31 Aug 2015 08:40:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.7 with SMTP id v7ls501005laa.107.gmail; Mon, 31 Aug 2015 08:40:02 -0700 (PDT) X-Received: by 10.112.85.204 with SMTP id j12mr10557864lbz.47.1441035602956; Mon, 31 Aug 2015 08:40:02 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id r5si13426496lbw.126.2015.08.31.08.40.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Aug 2015 08:40:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by labnh1 with SMTP id nh1so48822693lab.3 for ; Mon, 31 Aug 2015 08:40:02 -0700 (PDT) X-Received: by 10.112.77.10 with SMTP id o10mr10837402lbw.73.1441035602790; Mon, 31 Aug 2015 08:40:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.151.194 with SMTP id us2csp1714711lbb; Mon, 31 Aug 2015 08:40:01 -0700 (PDT) X-Received: by 10.66.148.136 with SMTP id ts8mr39334824pab.15.1441035601552; Mon, 31 Aug 2015 08:40:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hc1si4578598pbc.117.2015.08.31.08.40.00; Mon, 31 Aug 2015 08:40:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752838AbbHaPj7 (ORCPT + 8 others); Mon, 31 Aug 2015 11:39:59 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:42359 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752568AbbHaPj6 (ORCPT ); Mon, 31 Aug 2015 11:39:58 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id t7VFdIvJ001069; Mon, 31 Aug 2015 10:39:18 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t7VFdIVN018127; Mon, 31 Aug 2015 10:39:18 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Mon, 31 Aug 2015 10:39:18 -0500 Received: from psplinux063.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t7VFdAsI008245; Mon, 31 Aug 2015 10:39:15 -0500 From: Sekhar Nori To: Tony Lindgren , Felipe Balbi CC: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Device Tree Mailing List , Greg Kroah-Hartman , Linux OMAP Mailing List , , Linux ARM Mailing List Subject: [PATCH 1/2] usb: dwc3: support for pinctrl state change during system sleep Date: Mon, 31 Aug 2015 21:09:08 +0530 Message-ID: <9dd70870cfee40154a37186d4cf3ae0e9a452cbd.1441029572.git.nsekhar@ti.com> X-Mailer: git-send-email 2.4.4.408.g16da57c In-Reply-To: References: MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nsekhar@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add support for USB DRVVBUS pinctrl state change during suspend/resume. This helps is conserving power during system sleep. Signed-off-by: Sekhar Nori --- drivers/usb/dwc3/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index ff5773c66b84..a5ffa66e39fb 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1093,6 +1093,8 @@ static int dwc3_suspend(struct device *dev) phy_exit(dwc->usb2_generic_phy); phy_exit(dwc->usb3_generic_phy); + pinctrl_pm_select_sleep_state(dev); + return 0; } @@ -1102,6 +1104,8 @@ static int dwc3_resume(struct device *dev) unsigned long flags; int ret; + pinctrl_pm_select_default_state(dev); + usb_phy_init(dwc->usb3_phy); usb_phy_init(dwc->usb2_phy); ret = phy_init(dwc->usb2_generic_phy);