From patchwork Mon May 28 14:36:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 137079 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp2904743lji; Mon, 28 May 2018 07:36:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKBFHs7rn7MNCDdQqs0RwFJrJoEhOXE94ECSdsPTAP54ZKwCg8EVGU6Ccxrc5gnrQH1HcqL X-Received: by 2002:a65:4b82:: with SMTP id t2-v6mr6903541pgq.175.1527518191691; Mon, 28 May 2018 07:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527518191; cv=none; d=google.com; s=arc-20160816; b=ixkcHYPzeDGa5K9ET5wg76stVZyw+h8Qm7hzIGMCmXYxWsARocoRdHhbsrjLvNsh9U L7X1awXVAgkwn7po9ERCgO3ufug51Kn3j0lyaQ+QVv0vsrFdGtYY97BIZUb6eRU8HPJx SyTqMdDgkLw//8ajAXhlsCiOe02NoQAVdWzNkuvVD0cdxP+TYA2i1rrC8AE7gK/r33E0 bKzFJH7qUBkBxXzH4H9S6Bbn4LHD9BNb3VcbmuLs51rQFxEEEpbyQFA67i2ZeEZ0Uy4c ZGUrqqgbi4UKkhiq7n2cOknFLx0CNTCIuZsRxyQhiXGDbpevkVrx6par+gPHvz049M4w RGhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=il+BaxJTmZCb2gKYryTMeoXUFP3jsw+W2CvKuUbaKMY=; b=jK2C3Bf4OH9tb8YMVAHkNV5PZFTVWr/MU3iB2zh0VGs9BUqxaQFPa1JKsPCq72T+KH 713h5fLu8uf03H7UTh0Z41TvyIXm4MMpAKHUG87SwEebi4rdUWBH/JczYuNOCIRYbrYu O7NSumnckJ6RVd14+2cDDJraX36TzTxIMz0W7QPNAk0Blvp30VsDxc6q9LBkOGt1Mc3P vqJ4Fle0sh5qpzDMOlEK+6mmW8AEWNHi3049L0C2k1jmaNkeX7f967DMfutiaWvsRS9J o3tGI+8LNoa7TA6/lESCCBc8T289/ngqJNJ7NOigTo1l04P3ieV2Zb5AZbhE3IJ1hBIM UkEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=ipkQjug1; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13-v6si15172834pgp.195.2018.05.28.07.36.31; Mon, 28 May 2018 07:36:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=ipkQjug1; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161553AbeE1Oga (ORCPT + 3 others); Mon, 28 May 2018 10:36:30 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:56456 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968924AbeE1Og0 (ORCPT ); Mon, 28 May 2018 10:36:26 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4SEaOxB005758; Mon, 28 May 2018 09:36:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1527518184; bh=X/irt85xPu9oznaPjCoAoABOjiI7N1NVnPM6CfK3y2U=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ipkQjug1fvSc8rbeoZLLkiK3B9hf0lQf9QJQY/BUS0/7bBEWQWW65m+Di6IgbfDpF leG9EGJN6b3BhlmJwVEFNcd+yG7ndzh+3TXDvhoAnvL+0KiJDj4mxQMT0eDHv45WJY e5o+iEYAHHn3DA4H4NY8zi56KAmsYF7wpvfE5Yeg= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4SEaOFT021756; Mon, 28 May 2018 09:36:24 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 28 May 2018 09:36:24 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 28 May 2018 09:36:24 -0500 Received: from dlelxv97.itg.ti.com (dlelxv97.itg.ti.com [172.17.2.193]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4SEaOEb001885; Mon, 28 May 2018 09:36:24 -0500 Received: from lta0400828d.ti.com (vboxa0400828d.emea.dhcp.ti.com [172.22.236.98]) by dlelxv97.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4SEaKPL014400; Mon, 28 May 2018 09:36:22 -0500 From: Roger Quadros To: CC: , , Roger Quadros Subject: [PATCH 2/2] usb: dwc3: of_simple: don't call pm_runtime_set_active() Date: Mon, 28 May 2018 17:36:14 +0300 Message-ID: <1527518174-27860-2-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527518174-27860-1-git-send-email-rogerq@ti.com> References: <1527518174-27860-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Don't call pm_runtime_set_active() as it will prevent the device from being activated in the next pm_runtime_get_sync() call. Also call pm_runtime_get_sync() before of_platform_populate(). Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-of-simple.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- cheers, -roger Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c index e98d221..2cbb5c0 100644 --- a/drivers/usb/dwc3/dwc3-of-simple.c +++ b/drivers/usb/dwc3/dwc3-of-simple.c @@ -121,6 +121,9 @@ static int dwc3_of_simple_probe(struct platform_device *pdev) if (ret) goto err_resetc_assert; + pm_runtime_enable(dev); + pm_runtime_get_sync(dev); + ret = of_platform_populate(np, NULL, NULL, dev); if (ret) { for (i = 0; i < simple->num_clocks; i++) { @@ -131,10 +134,6 @@ static int dwc3_of_simple_probe(struct platform_device *pdev) goto err_resetc_assert; } - pm_runtime_set_active(dev); - pm_runtime_enable(dev); - pm_runtime_get_sync(dev); - return 0; err_resetc_assert: