From patchwork Fri Feb 3 23:31:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Dasu X-Patchwork-Id: 9555321 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1D258602B7 for ; Fri, 3 Feb 2017 23:31:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E5E527F86 for ; Fri, 3 Feb 2017 23:31:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02DE328425; Fri, 3 Feb 2017 23:31:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F5A527F86 for ; Fri, 3 Feb 2017 23:31:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752950AbdBCXbu (ORCPT ); Fri, 3 Feb 2017 18:31:50 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:33852 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752936AbdBCXbt (ORCPT ); Fri, 3 Feb 2017 18:31:49 -0500 Received: by mail-qt0-f196.google.com with SMTP id w20so7600040qtb.1 for ; Fri, 03 Feb 2017 15:31:49 -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; bh=QLk4c6WY8WOt+ljydm+Af/ZKK+gL45hjeZJYifzmPKM=; b=auVzXKvoLkdWE/6edLdgnv92262Xec7If5E+0cinq06pKow0lLJYIsAm+Uqq1EQ2vX K2dFx6xKbWj2h4vS5MVoceiV7Dw3xSWKgB+MPyaqPkVCFPTVCaAfXsOiotpEP7PzSVit nO/HFClkjQftq5HW+FSwBKSMkjdkxCt7pQr6NG+Xb6OZ+MxgzyFOQAEwfpJL1d+/0yDg yHnBJGDo8WZW0VN28QqniPhHP5lEndU3pGGqZItX8APG8lGukDe6hilRlBQBQtx2BhAe Fr2Y6hcwLDwQe8FuLCpe5llp/azz2cjwL/b4E8G+eU3cTsj5r/EKB6iUiOpytPLk+SbE pR/A== 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; bh=QLk4c6WY8WOt+ljydm+Af/ZKK+gL45hjeZJYifzmPKM=; b=oyPQzr23qVkRCym+qzF0LLWJgWSlJxlBb22FCymkrlKJzgRDWLwpK/Nsp1NlbJKCwH 50ukN29sU+jVV1yYCXcNwxLNChhapZGbYnKbtZtVoZuMVyIiHOE0bQwOvuLGbeKQBBw0 h+iagS+FRUR9jt4ZTLSP3BnAGY4fGFHzf7cYXT2eFHgjJvlc4K6f0EAoR/V2C0npCmPR 2UN+psKO13fQRrCjraPtEs6UhGh5yIJKEokxBS8pc98X1JYAiPDVxOXHRG3Rm7I8BXvG CnVUrQ8ociBewNPL7NvP9/DY7aGGq9MTLcR6PSlv8NW3UGjouwz+taMG7wZNaP5kZ4zx USYA== X-Gm-Message-State: AIkVDXLQu9T/DQGlGK1LzZ9PnNr/ofJUHrDmyJp/q5aW5BxYOliXCQXIZfxGZ5rKKv0Iag== X-Received: by 10.55.127.2 with SMTP id a2mr16034513qkd.319.1486164708748; Fri, 03 Feb 2017 15:31:48 -0800 (PST) Received: from mail.broadcom.com ([192.19.218.250]) by smtp.gmail.com with ESMTPSA id 140sm25747914qkj.19.2017.02.03.15.31.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Feb 2017 15:31:48 -0800 (PST) From: Kamal Dasu To: linux-spi@vger.kernel.org, cyrille.pitchen@atmel.com, marex@denx.de, broonie@kernel.org Cc: linux-mtd@lists.infradead.org, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, Kamal Dasu Subject: [PATCH v1 5/5] spi: bcm-qspi: Implement the master flash_pm_supported() call Date: Fri, 3 Feb 2017 18:31:16 -0500 Message-Id: <1486164676-12912-6-git-send-email-kdasu.kdev@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486164676-12912-1-git-send-email-kdasu.kdev@gmail.com> References: <1486164676-12912-1-git-send-email-kdasu.kdev@gmail.com> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Broadcom SoCs needs pm rescan support for the flash device to to be cofgured in the probed state on pm resume. Implement flash_pm_supported() spi core interface to return true. Signed-off-by: Kamal Dasu --- drivers/spi/spi-bcm-qspi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index 14f9dea..0abcde6 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -958,6 +958,11 @@ static int bcm_qspi_transfer_one(struct spi_master *master, return 0; } +static bool bcm_qspi_flash_pm_supported(struct spi_device *spi) +{ + return true; +} + static void bcm_qspi_cleanup(struct spi_device *spi) { struct bcm_qspi_parms *xp = spi_get_ctldata(spi); @@ -1194,6 +1199,7 @@ int bcm_qspi_probe(struct platform_device *pdev, master->setup = bcm_qspi_setup; master->transfer_one = bcm_qspi_transfer_one; master->spi_flash_read = bcm_qspi_flash_read; + master->flash_pm_supported = bcm_qspi_flash_pm_supported; master->cleanup = bcm_qspi_cleanup; master->dev.of_node = dev->of_node; master->num_chipselect = NUM_CHIPSELECT;