From patchwork Wed Mar 5 07:19:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3771091 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 357B1BF13A for ; Wed, 5 Mar 2014 07:20:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A0C620237 for ; Wed, 5 Mar 2014 07:20:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 90D8E20222 for ; Wed, 5 Mar 2014 07:20:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753754AbaCEHTX (ORCPT ); Wed, 5 Mar 2014 02:19:23 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:61925 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753713AbaCEHTR (ORCPT ); Wed, 5 Mar 2014 02:19:17 -0500 Received: by mail-pa0-f43.google.com with SMTP id bj1so713791pad.2 for ; Tue, 04 Mar 2014 23:19:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=Tc0e77IoL7cUuYu4SI/ErWfpdSruju43wGmB71Hw/bs=; b=TGwWQJpnAtYqSRLDmlFpwEmTC659MvhsfQD45yfvZ0dqEw2ALcR+Xya+nChNhQzmCN ABM4J08ogoTO3gvRq8YkzUaQQbg3dwsPmN0EIFn4RWWorp6WuZsKlnNq/bYZAhfcTTgl iSKwQ5GPzMc4kj4+mkoZwffbpc6JhPGAhVVTkUPoTQV8Anr28yhFQ2b70PH6pjJG9zwP hk2Ntrq18N2ezyZdDuugYyeYVHq62xgWILmXoIytc2+sqqgJ0SbYRWYCLNKuxOD3GYpQ 7iyzofRXqPtPsixFXg3U4g0myiHpM0Gq6qgiUhHTJZFpk3FnQWMKhk/mM4ZnAb/oigcb tgOg== X-Gm-Message-State: ALoCoQmBFhtlVAVvy+lPz5OikbfN6j4VsANvAYS/sya9O0m2yAkOGoebn1W0GdN5WRZxK1roZJet X-Received: by 10.68.202.8 with SMTP id ke8mr5010179pbc.86.1394003957192; Tue, 04 Mar 2014 23:19:17 -0800 (PST) Received: from [192.168.0.102] (218-164-139-107.dynamic.hinet.net. [218.164.139.107]) by mx.google.com with ESMTPSA id ug9sm4679433pbc.11.2014.03.04.23.19.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 23:19:16 -0800 (PST) Message-ID: <1394003949.18343.4.camel@phoenix> Subject: [RFT][PATCH 2/2] spi: sirf: Add missing spi_master_{resume, suspend} calls to PM callbacks From: Axel Lin To: Mark Brown Cc: Barry Song , linux-spi@vger.kernel.org Date: Wed, 05 Mar 2014 15:19:09 +0800 In-Reply-To: <1394003843.18343.2.camel@phoenix> References: <1394003843.18343.2.camel@phoenix> X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is required since commit 2025172e3280 "spi/bitbang: Use core message pump". spi-bitbang now uses core message pump, so it needs to call spi_master_suspend/ spi_master_resume to stop/start the queue while suspend/resume. Signed-off-by: Axel Lin --- drivers/spi/spi-sirf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index a72b8f8..1a77ad5 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c @@ -748,6 +748,11 @@ static int spi_sirfsoc_suspend(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); struct sirfsoc_spi *sspi = spi_master_get_devdata(master); + int ret; + + ret = spi_master_suspend(master); + if (ret) + return ret; clk_disable(sspi->clk); return 0; @@ -764,7 +769,7 @@ static int spi_sirfsoc_resume(struct device *dev) writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_RXFIFO_OP); writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_TXFIFO_OP); - return 0; + return spi_master_resume(master); } #endif