From patchwork Mon Apr 1 13:54:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 2370901 Return-Path: X-Original-To: patchwork-linux-omap@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 AA1DDDFB7B for ; Mon, 1 Apr 2013 13:59:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758744Ab3DAN6a (ORCPT ); Mon, 1 Apr 2013 09:58:30 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:12220 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758585Ab3DAN60 (ORCPT ); Mon, 1 Apr 2013 09:58:26 -0400 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKK002PUXHCW830@mailout3.samsung.com>; Mon, 01 Apr 2013 22:58:25 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.123]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 2F.2C.12250.08299515; Mon, 01 Apr 2013 22:58:24 +0900 (KST) X-AuditID: cbfee691-b7f5f6d000002fda-c4-515992803f0f Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id F1.D5.17838.08299515; Mon, 01 Apr 2013 22:58:24 +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:24 +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 07/11] usb: phy: samsung: Enable runtime power management on usb2phy Date: Mon, 01 Apr 2013 19:24:06 +0530 Message-id: <1364824448-14732-8-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+NgFlrGIsWRmVeSWpSXmKPExsWyRsSkWrdhUmSgwfaHZhYH79dbnF12kM2i efF6NoveBVfZLC487WGzuLxrDpvF7CX9LBYzzu9jsli0rJXZ4vyWTiaLwysOMFk0nzjFbDHh 9wU2i/UzXrM48Hks+HyF3WN2w0UWj3knAz32z10D5N39wejRt2UVo8fxG9uZPD5vkgvgiOKy SUnNySxLLdK3S+DK2LryAVvBLPaKO8cPMDUw9rN1MXJySAiYSNw48AHKFpO4cG89kM3FISSw lFFi0cIjjDBF/e/Ws0AkFjFKvFh8DapqCpPEhGc/mUCq2AR0JZre7gLq4OAQEYiT2DxBGCTM LNDFJLH0qDiILSwQKbH48V92EJtFQFXifH8fWCuvgIfEixv/WSGWKUi8uf2MGcTmFPCU+LB1 MViNEFBN+9UTrCB7JQTusUtcmr6bCWKQgMS3yYdYQPZKCMhKbDrADDFHUuLgihssExiFFzAy rGIUTS1ILihOSi8y1StOzC0uzUvXS87P3cQIjKPT/55N3MF4/4D1IcZkoHETmaVEk/OBcZhX Em9obGZkYWpiamxkbmlGmrCSOK96i3WgkEB6YklqdmpqQWpRfFFpTmrxIUYmDk6pBkYuJocD z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OLrb WMxtbHkvuTrnwcqTbI8kDCeYLIi297y1+a7k+5TjzkosxRmJhlrMRcWJAG1LaDsWAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Enable autosuspending of Samsung usb2.0 PHY Signed-off-by: Vivek Gautam --- drivers/usb/phy/phy-samsung-usb2.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/usb/phy/phy-samsung-usb2.c b/drivers/usb/phy/phy-samsung-usb2.c index 45ffe03..d378fe9 100644 --- a/drivers/usb/phy/phy-samsung-usb2.c +++ b/drivers/usb/phy/phy-samsung-usb2.c @@ -423,6 +423,9 @@ static int samsung_usb2phy_probe(struct platform_device *pdev) platform_set_drvdata(pdev, sphy); + pm_runtime_set_active(&pdev->dev); + pm_runtime_enable(&pdev->dev); + return usb_add_phy(&sphy->phy, USB_PHY_TYPE_USB2); } @@ -432,6 +435,8 @@ static int samsung_usb2phy_remove(struct platform_device *pdev) usb_remove_phy(&sphy->phy); + pm_runtime_disable(&pdev->dev); + if (sphy->pmuregs) iounmap(sphy->pmuregs); if (sphy->sysreg)