Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752523Ab3CBNZ1 (ORCPT ); Sat, 2 Mar 2013 08:25:27 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:12941 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752429Ab3CBNZX (ORCPT ); Sat, 2 Mar 2013 08:25:23 -0500 X-AuditID: cbfee68e-b7fa46d00000627e-f6-5131fdc2f257 From: Vivek Gautam To: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org, gregkh@linuxfoundation.org, balbi@ti.com, sarah.a.sharp@linux.intel.com, kgene.kim@samsung.com, kishon@ti.com Subject: [PATCH v2 03/10] usb: dwc3: Enable runtime pm only after PHYs are initialized Date: Sat, 02 Mar 2013 18:53:04 +0530 Message-id: <1362230590-20960-4-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 In-reply-to: <1362230590-20960-1-git-send-email-gautam.vivek@samsung.com> References: <1362230590-20960-1-git-send-email-gautam.vivek@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRmVeSWpSXmKPExsWyRsSkWvfQX8NAgxtT+S0O3q+3aF68ns2i d8FVNosLT3vYLC7vmsNmMXtJP4vFjPP7mCwWLWtltmg+cYrZgdNj3slAj/1z17B79G1Zxehx /MZ2Jo/Pm+QCWKO4bFJSczLLUov07RK4MjZ1XWYv+MhRsfLyT6YGxj3sXYwcHBICJhLLJ4d0 MXICmWISF+6tZ+ti5OIQEljKKPFi1QVWiISJxIUtUxghEtMZJR4enssK4Uxhknj17QQjSBWb gK5E09tdYLaIgKzE4Su/mUGKmAUuMUqsWLGFBSQhLBAh8XfxB7DVLAKqEgcX14OEeQU8JD6e usgEsU1B4s3tZ8wgNqeAp8T065vBrhACqvlz7zg7yEwJgXXsEi+W94ElWAQEJL5NPsQC8Y6s xKYDzBBzJ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f+7Y8LYpN2W9F3eH eb7AWbtjh8+fmxjAFVhx+U/ilKbnks+dw+w6dk6YwBwx5+iF+OaSz15sJ1a91rTe/GZf5JmJ bibbVn5/VS67q9fIwKIsMGeekm3NQ4FLulO3Vd7UMvw8vefDs0XLJZ4KPZeY4PxdiaU4I9FQ i7moOBEAITLnCO8CAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1344 Lines: 43 Allow dwc3 to enable auto power management only after its PHYs are initialized so that any further PHY handling by dwc3's runtime power management callbacks is fine. Signed-off-by: Vivek Gautam --- drivers/usb/dwc3/core.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 85914e0..2a77327 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -453,10 +453,6 @@ static int dwc3_probe(struct platform_device *pdev) dwc->needs_fifo_resize = of_property_read_bool(node, "tx-fifo-resize"); - pm_runtime_enable(dev); - pm_runtime_get_sync(dev); - pm_runtime_forbid(dev); - dwc3_cache_hwparams(dwc); ret = dwc3_alloc_event_buffers(dwc, DWC3_EVENT_BUFFERS_SIZE); @@ -478,6 +474,10 @@ static int dwc3_probe(struct platform_device *pdev) goto err1; } + pm_runtime_enable(dev); + pm_runtime_get_sync(dev); + pm_runtime_forbid(dev); + if (IS_ENABLED(CONFIG_USB_DWC3_HOST)) mode = DWC3_MODE_HOST; else if (IS_ENABLED(CONFIG_USB_DWC3_GADGET)) -- 1.7.6.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/