From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9530A846C for ; Fri, 10 Mar 2023 14:33:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07CCDC433D2; Fri, 10 Mar 2023 14:33:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678458816; bh=8pS1iz809DRF+lLoMZNhcG0nBDd26a1JoSXQmvAOk/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pqXUNuXRY6Dy85CvZCinhO6UYY1Wye48yQ+CCOmHI//lfrcKCZnerlRd8K3J/Ik7i RIxl9UI+6Pyd8FWOvUg97MkSwZL0gpe+AhCz0S5kAEtlck0NA9QLGeem2gosEzpmZg iM03OLsZl1JuLbbbpLL4LO0T9ZeuLHBMIo5tjIyM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= , Mark Brown , Sasha Levin Subject: [PATCH 5.4 124/357] spi: bcm63xx-hsspi: fix pm_runtime Date: Fri, 10 Mar 2023 14:36:53 +0100 Message-Id: <20230310133740.129067443@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310133733.973883071@linuxfoundation.org> References: <20230310133733.973883071@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Álvaro Fernández Rojas [ Upstream commit 216e8e80057a9f0b6366327881acf88eaf9f1fd4 ] The driver sets auto_runtime_pm to true, but it doesn't call pm_runtime_enable(), which results in "Failed to power device" when PM support is enabled. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210223151851.4110-3-noltari@gmail.com Signed-off-by: Mark Brown Stable-dep-of: 811ff802aaf8 ("spi: bcm63xx-hsspi: Fix multi-bit mode setting") Signed-off-by: Sasha Levin --- drivers/spi/spi-bcm63xx-hsspi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index 657855c56c1cb..b2b6ae4749568 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c @@ -20,6 +20,8 @@ #include #include #include +#include +#include #define HSSPI_GLOBAL_CTRL_REG 0x0 #define GLOBAL_CTRL_CS_POLARITY_SHIFT 0 @@ -428,13 +430,17 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev) if (ret) goto out_put_master; + pm_runtime_enable(&pdev->dev); + /* register and we are done */ ret = devm_spi_register_master(dev, master); if (ret) - goto out_put_master; + goto out_pm_disable; return 0; +out_pm_disable: + pm_runtime_disable(&pdev->dev); out_put_master: spi_master_put(master); out_disable_pll_clk: -- 2.39.2