From patchwork Mon Nov 20 17:06:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Patchwork-Id: 13461609 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA268C2BB3F for ; Mon, 20 Nov 2023 17:06:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dmNji9wcfIOz9U7Uwu96lQwHoju+WwsEbhA8jCdRVAo=; b=PZ7NIN/LXE5BDC lUzxE/vgFCy3LXHEiT08lNg0lZCvkrrrv1E6dmq1VkqAIQNhXynpbHUn2IJsmIXL3pu+j/n+MBtRY +ovjADM5hTbGqnh0T5TSHOlhM32NGvda0Q0MpUijvJnxj7KMcxPL3YD3h/SVmfVezUePnJWCxvtp+ IgBNEMwd3ylHWAzx711LxdMS+UAfcvSUtB4Xpp8pJ1T+EJXopvqnVCVpdYC9yT1bPyJIfHqjgNYPl b1E0KPrmzDPs6xgeaQtwfTLV6cyW5wdW3YjVbRh4FhI70EoatSHXZAGueWLUIwlrvz2f+nbvnvg43 vn85sxBPBkQ6XipytiGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r57j0-00DaHQ-23; Mon, 20 Nov 2023 17:06:18 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r57iu-00Da9F-2k for linux-arm-kernel@lists.infradead.org; Mon, 20 Nov 2023 17:06:15 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 84998E0005; Mon, 20 Nov 2023 17:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700499969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fQQDcKI+dpqgp9ry2CvzyMUklTw/BkteRs5/KYF01kQ=; b=bqXXNWdpzIkufw4/eBc9jm55Uw3x8QkodfspyE1V7Jt+eTNF+aB5jVNMr63m7CJKLPL9V/ 25zj0k/IZmeIlj2rNI9vNOSsHQ1zIsBpG9jm8NDXSlWdiao3FRmKMgZsojofjej2IsLGQn 4eUhchBUDXdeiYU1BlCqjjwjm3ruF33e6vUAI1nI5MXjt4EX83GhArHCoA4z3MQ0VlRUBY 7kjlZPtdgMbG7ja9akO+ifJXVaAAzpSF9+3bRs/HDtUD3hXeITuXdenKFW4ESOuknxNc8r quOGntw4hqr2MDIbSBQKIhDfbNaVrP6+saU9tTuCjXizS1knc8rGLiNcuN/k6A== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Mon, 20 Nov 2023 18:06:02 +0100 Subject: [PATCH v2 2/7] usb: cdns3-ti: remove runtime PM MIME-Version: 1.0 Message-Id: <20231120-j7200-usb-suspend-v2-2-038c7e4a3df4@bootlin.com> References: <20231120-j7200-usb-suspend-v2-0-038c7e4a3df4@bootlin.com> In-Reply-To: <20231120-j7200-usb-suspend-v2-0-038c7e4a3df4@bootlin.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Roger Quadros , Peter Chen , Pawel Laszczak , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "Thomas Petazzoni thomas.petazzoni"@bootlin.com, =?utf-8?q?Gr=C3=A9gory_Cl?= =?utf-8?q?ement?= , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.12.3 X-GND-Sasl: theo.lebrun@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231120_090613_219253_17EB494D X-CRM114-Status: GOOD ( 13.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver does not use RPM. It enables it & gets a reference at probe. It then undoes that on probe error or at remove. Signed-off-by: Théo Lebrun --- drivers/usb/cdns3/cdns3-ti.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c index 5945c4b1e11f..dc1594acdcee 100644 --- a/drivers/usb/cdns3/cdns3-ti.c +++ b/drivers/usb/cdns3/cdns3-ti.c @@ -135,13 +135,6 @@ static int cdns_ti_probe(struct platform_device *pdev) rate_code = i; - pm_runtime_enable(dev); - error = pm_runtime_get_sync(dev); - if (error < 0) { - dev_err(dev, "pm_runtime_get_sync failed: %d\n", error); - goto err; - } - /* assert RESET */ reg = cdns_ti_readl(data, USBSS_W1); reg &= ~USBSS_W1_PWRUP_RST; @@ -179,16 +172,10 @@ static int cdns_ti_probe(struct platform_device *pdev) error = of_platform_populate(node, NULL, NULL, dev); if (error) { dev_err(dev, "failed to create children: %d\n", error); - goto err; + return error; } return 0; - -err: - pm_runtime_put_sync(data->dev); - pm_runtime_disable(data->dev); - - return error; } static int cdns_ti_remove_core(struct device *dev, void *c) @@ -205,8 +192,6 @@ static void cdns_ti_remove(struct platform_device *pdev) struct device *dev = &pdev->dev; device_for_each_child(dev, NULL, cdns_ti_remove_core); - pm_runtime_put_sync(dev); - pm_runtime_disable(dev); platform_set_drvdata(pdev, NULL); }