From patchwork Tue Feb 23 15:18:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 12100455 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87EE1C433DB for ; Tue, 23 Feb 2021 15:20:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 345D260241 for ; Tue, 23 Feb 2021 15:20:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 345D260241 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Aub7c7HfHJmmttBu0xzhvd40KLLOdmCPRDJxjMgQC8A=; b=gnRZxPL7PGTE/YVre6knrSbub dSjwHJuN2pqQIBHRLo4S9jEOJLSpbTjD3yK11GCJqJ8MKfOsvoctDebx5wFUg82QKY+roaWWvaUG+ HW+ayElRP/cuUbufWnaRp5KpEqdIAiUG5m59RucPsdIdhmwSehLYnDisF9lORzyEj/2yi1O2gIlzR 5YEDXucNuS88ztK5lYNIsTx88RNxlClYDHHTA5/Cn/zvLETP2CRkNe+ZndP1siil92ldsWQWu1Gw6 2QFkWN8IziSBLgZoCIuNX5YoDqL4HvLt8z3xQ7ef/rMEENFcc13M+eIEB1REYXeb2PFDulrpK+IXv 8pffSLr3Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEZSv-0008KO-Cd; Tue, 23 Feb 2021 15:19:09 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEZSn-0008IZ-3H for linux-arm-kernel@lists.infradead.org; Tue, 23 Feb 2021 15:19:01 +0000 Received: by mail-wr1-x435.google.com with SMTP id r3so11315014wro.9 for ; Tue, 23 Feb 2021 07:18:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VVd28ukkiNf74ssL9JqbPQSRVlXUhzl9Tn7fvTHWtHY=; b=KzERRjJLX86zYsWtBHnmkxT1WDbq5FWR+wZQPCpW9xgAW2bT8jJo4In3zG7ppvjp8M WTV0hKaDdDKb/hrUuO4YQ0k7ldZzwGCQzkxcGvYaXXNmUmekybNZwyBbJaTqXfNIoZk2 Ex8+L5pfKsUtkA5d0z+MzilBFSmqtsz9zGXEuExSfFIeodp5tI0nzFOQrzUv1RQcA0xr UXizyAD6MCeVrd0JQGkNRL4IP51snhnwhIa3iXi7av9qeLorZ4WPrrQc+JTc62/d0HQM Rr9P5/xyNGq6WXmAtesMFc+beRd0R1X05leaM0AJLZe32r5kbycvslOcpe0w2nI0JkNV MFBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VVd28ukkiNf74ssL9JqbPQSRVlXUhzl9Tn7fvTHWtHY=; b=AlXv4Hf/8SoqHdSbNaqjyU8ZFrrzRU4Q4UENx31fbS8sQSP4Wrxb9JAOYRz6YJbHWp /k/4novj/379+A8cQxouSza/gsTExW+VRRETmn2r9bfMMSOwy61/h8auTJD+mkFzHgJU /sB2AaUxBZ239DW+K/Aaax7KyKmFkT7bnTRY+5sGbl4euDGsmrO5sySiO/JfbpeQu0A3 HORXQC4MLCKFwAhBdz4VaD9o5H74cj7A9B40e2qvYOIqoQ7UYLS1s2V/SHx+ZcUDCiWl 3Jb7arpMzYL9HBkI30WFSGXVKlUlKBNCGd8KeUaqXvY3hHvwHTrTBMwDyi1AVYPtK0CC Dj2g== X-Gm-Message-State: AOAM530OseaEVbHOGTZyTskXcZTesanrmYpY9MSgDa3FUCmPIF7auom7 YsJE9vnzNj3SYh3NGC98cCM= X-Google-Smtp-Source: ABdhPJyJ7As5wlQUT5W5m0iAAoD7gNJJ4/lM+5c4AaEQpyuF/D8PiZShtoxKYnYe7fVuDfrvI7ft+w== X-Received: by 2002:adf:80e7:: with SMTP id 94mr26725351wrl.5.1614093535715; Tue, 23 Feb 2021 07:18:55 -0800 (PST) Received: from skynet.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id y6sm3018071wma.10.2021.02.23.07.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 07:18:55 -0800 (PST) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: jonas.gorski@gmail.com, Mark Brown , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] spi: bcm63xx-hsspi: fix pm_runtime Date: Tue, 23 Feb 2021 16:18:51 +0100 Message-Id: <20210223151851.4110-3-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210223151851.4110-1-noltari@gmail.com> References: <20210223151851.4110-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210223_101901_167495_68DCF9F0 X-CRM114-Status: GOOD ( 15.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/spi/spi-bcm63xx-hsspi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index 1f08d7553f07..b871fd810d80 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c @@ -21,6 +21,7 @@ #include #include #include +#include #define HSSPI_GLOBAL_CTRL_REG 0x0 #define GLOBAL_CTRL_CS_POLARITY_SHIFT 0 @@ -439,13 +440,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: