From patchwork Mon Apr 1 13:54:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 2370971 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 1D0ABDFB7B for ; Mon, 1 Apr 2013 13:59:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758580Ab3DAN6X (ORCPT ); Mon, 1 Apr 2013 09:58:23 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:43950 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758586Ab3DAN6P (ORCPT ); Mon, 1 Apr 2013 09:58:15 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKK00LYGXH10K20@mailout2.samsung.com>; Mon, 01 Apr 2013 22:58:14 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 26.12.02019.57299515; Mon, 01 Apr 2013 22:58:13 +0900 (KST) X-AuditID: cbfee690-b7f656d0000007e3-5e-515992756e74 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 2F.C5.17838.57299515; Mon, 01 Apr 2013 22:58:13 +0900 (KST) Received: from vivekkumarg-linuxpc.sisodomain.com ([107.108.214.169]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MKK00JXCXD41C70@mmp1.samsung.com>; Mon, 01 Apr 2013 22:58:13 +0900 (KST) From: Vivek Gautam To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, balbi@ti.com, stern@rowland.harvard.edu, sarah.a.sharp@linux.intel.com, rob.herring@calxeda.com, kgene.kim@samsung.com, kishon@ti.com, dianders@chromium.org, t.figa@samsung.com, p.paneri@samsung.com Subject: [PATCH v3 06/11] usb: xhci: Enable runtime pm in xhci-plat Date: Mon, 01 Apr 2013 19:24:05 +0530 Message-id: <1364824448-14732-7-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 In-reply-to: <1364824448-14732-1-git-send-email-gautam.vivek@samsung.com> References: <1364824448-14732-1-git-send-email-gautam.vivek@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRmVeSWpSXmKPExsWyRsSkTrd0UmSgwf6PZhYH79dbnF12kM2i efF6NoveBVfZLC487WGzuLxrDpvF7CX9LBYzzu9jsli0rJXZ4vyWTiaLwysOMFk0nzjFbDHh 9wU2i/UzXrM48Hks+HyF3WN2w0UWj3knAz32z10D5N39wejRt2UVo8fxG9uZPD5vkgvgiOKy SUnNySxLLdK3S+DKOL7JvGA6V8WhL+9ZGhj3cnQxcnJICJhI7LzRzgphi0lcuLeerYuRi0NI YCmjxK6vHxlhig5+esUCkVjEKPF27XtGCGcKk8TlOW1g7WwCuhJNb3cBJTg4RATiJDZPEAYJ Mwt0MUksPSoOYgsLOEtMvd/PDmKzCKhK9D3qYwOxeQU8JF7/7WGDWKYg8eb2M2YQm1PAU+LD 1sVMILYQUE371ROsIHslBB6xS7Qfec8EMUhA4tvkQywgeyUEZCU2HWCGmCMpcXDFDZYJjMIL GBlWMYqmFiQXFCelF5noFSfmFpfmpesl5+duYgRG0el/zybsYLx3wPoQYzLQuInMUqLJ+cAo zCuJNzQ2M7IwNTE1NjK3NCNNWEmcV73FOlBIID2xJDU7NbUgtSi+qDQntfgQIx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p+pONR/+kUu+er++NS 5vpdm3Is+sZmxjctgton/4dH5/2caqSSIZz59JTHX1sjJZbijERDLeai4kQAX1dmwBUDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org By enabling runtime pm in this driver allows users of xhci-plat to enter into runtime pm. This is not full runtime pm support (AKA xhci-plat doesn't actually power anything off when in runtime suspend mode) but, just basic enablement. Signed-off-by: Vivek Gautam CC: Doug Anderson --- drivers/usb/host/xhci-plat.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index df90fe5..b10573e 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -12,6 +12,7 @@ */ #include +#include #include #include @@ -149,6 +150,9 @@ static int xhci_plat_probe(struct platform_device *pdev) if (ret) goto put_usb3_hcd; + pm_runtime_set_active(&pdev->dev); + pm_runtime_enable(&pdev->dev); + return 0; put_usb3_hcd: @@ -174,6 +178,8 @@ static int xhci_plat_remove(struct platform_device *dev) struct usb_hcd *hcd = platform_get_drvdata(dev); struct xhci_hcd *xhci = hcd_to_xhci(hcd); + pm_runtime_disable(&dev->dev); + usb_remove_hcd(xhci->shared_hcd); usb_put_hcd(xhci->shared_hcd);