Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758750Ab3DAOAR (ORCPT ); Mon, 1 Apr 2013 10:00:17 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:43915 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758271Ab3DAN5s (ORCPT ); Mon, 1 Apr 2013 09:57:48 -0400 X-AuditID: cbfee691-b7f5f6d000002fda-f6-5159925bec4b 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 03/11] usb: dwc3: Enable runtime pm only after PHYs are initialized Date: Mon, 01 Apr 2013 19:24:02 +0530 Message-id: <1364824448-14732-4-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+NgFlrKIsWRmVeSWpSXmKPExsWyRsSkWjd6UmSgwfHHchYH79dbnF12kM2i efF6NoveBVfZLC487WGzuLxrDpvF7CX9LBYzzu9jsli0rJXZ4vyWTiaLwysOMFk0nzjFbDHh 9wU2i/UzXrM48Hks+HyF3WN2w0UWj3knAz32z10D5N39wejRt2UVo8fxG9uZPD5vkgvgiOKy SUnNySxLLdK3S+DK+LfmA0vBSe6Krr5O5gbGi5xdjJwcEgImEmtXH2CDsMUkLtxbD2RzcQgJ LGWUmLH+BStM0Yrtm1ghEosYJVa1PmWEcKYwSdz7f5cRpIpNQFei6e0uIJuDQ0QgTmLzBGGQ MLNAF5PE0qPiIGFhgQiJ/g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Iy5EBAqxJpYVV+YeYpTgYFYS4V2RGRkoxJuSWFmVWpQfX1Sak1p8 iDEZ6KqJzFKiyfnA9JFXEm9obGJuamxqaWJhYmZJmrCSOO/BVutAIYH0xJLU7NTUgtQimC1M HJxSDYzLEg8GrU+evMrX7Ukp17wFcn+cKxeYvkzYznDD3vqNf8oLn8on1f0PHEuOSJ026pyp bMnz4HpThVj3VK6VBZ+rWg82VIQw6PDHyzQ9dr10lIUvjjlS/Gz01wvGSyWrvqVer9Hy38t2 wUR9A+/+GXvmW7blfa89OffV9XCbnvm9sTduqdcwsCmxFGckGmoxFxUnAgC1Mmz1FQMAAA== 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: 1678 Lines: 53 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 | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 3a6993c..e250828 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -491,15 +491,6 @@ static int dwc3_probe(struct platform_device *pdev) dwc->needs_fifo_resize = of_property_read_bool(node, "tx-fifo-resize"); - /* Setting device state as 'suspended' initially, - * to make sure we know device state prior to - * pm_runtime_enable - */ - pm_runtime_set_suspended(dev); - 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); @@ -521,6 +512,15 @@ static int dwc3_probe(struct platform_device *pdev) goto err1; } + /* Setting device state as 'suspended' initially, + * to make sure we know device state prior to + * pm_runtime_enable + */ + pm_runtime_set_suspended(dev); + 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/