From patchwork Wed Mar 5 07:17:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3771001 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 60365BF13A for ; Wed, 5 Mar 2014 07:17:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 87F1120237 for ; Wed, 5 Mar 2014 07:17:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B178220240 for ; Wed, 5 Mar 2014 07:17:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751579AbaCEHRa (ORCPT ); Wed, 5 Mar 2014 02:17:30 -0500 Received: from mail-pb0-f52.google.com ([209.85.160.52]:61090 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751604AbaCEHR3 (ORCPT ); Wed, 5 Mar 2014 02:17:29 -0500 Received: by mail-pb0-f52.google.com with SMTP id rr13so696162pbb.39 for ; Tue, 04 Mar 2014 23:17:29 -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:content-type :mime-version:content-transfer-encoding; bh=UiDWwhOeaf1cc17rtoTE+3AMNi1M54i2cCFyPvyxjOg=; b=MmlPRf5sbSVo/pVJU73lIhlWwEpb6qj4jQWREXP3xhxmfTBiCi2mhG2NdMmSiZVsRm 8B+OJeWtzBDkJ94AKzo5w7cvQJIb2fDVEuUsV/ixYZUgoR5BBBW+CqpV9Ah86W/ksdxr 95C3pnnzYaBZIRb5muDTr39hhfJY1mdo0FFdxGL4NRl4J7Nt+kfaZ9c3E/A78eER0KzU f16WiGDAEp6/WnvkV/44L8TmQf9ZppNqrcXpFCDQU76F0tw+IyG8URG+slsN9pYDHH9Q 3LiLmJD9kJKPDE+4SKNdMRNt/Ib1AXfuTaSMcej8+pnABUWYtGZfkHI7MiG28Y7kC+h/ w02A== X-Gm-Message-State: ALoCoQlZx0l0y6MI0PGsnx7/Wswxpw6BDeDRD5naLVjC7LoTIHPVup8FAgt1NZbJv9/amydqIPaH X-Received: by 10.66.216.129 with SMTP id oq1mr4760793pac.75.1394003848982; Tue, 04 Mar 2014 23:17:28 -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 gj9sm4668757pbc.7.2014.03.04.23.17.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 23:17:28 -0800 (PST) Message-ID: <1394003843.18343.2.camel@phoenix> Subject: [RFT][PATCH 1/2] spi: s3c24xx: Add missing spi_master_{resume,suspend} calls to PM callbacks From: Axel Lin To: Mark Brown Cc: Ben Dooks , Kukjin Kim , linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org Date: Wed, 05 Mar 2014 15:17:23 +0800 X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 start/stop the queue while suspend/resume. Signed-off-by: Axel Lin --- drivers/spi/spi-s3c24xx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c index a275445..bed2338 100644 --- a/drivers/spi/spi-s3c24xx.c +++ b/drivers/spi/spi-s3c24xx.c @@ -633,6 +633,11 @@ static int s3c24xx_spi_remove(struct platform_device *dev) static int s3c24xx_spi_suspend(struct device *dev) { struct s3c24xx_spi *hw = dev_get_drvdata(dev); + int ret; + + ret = spi_master_suspend(hw->master); + if (ret) + return ret; if (hw->pdata && hw->pdata->gpio_setup) hw->pdata->gpio_setup(hw->pdata, 0); @@ -646,7 +651,7 @@ static int s3c24xx_spi_resume(struct device *dev) struct s3c24xx_spi *hw = dev_get_drvdata(dev); s3c24xx_spi_initialsetup(hw); - return 0; + return spi_master_resume(hw->master); } static const struct dev_pm_ops s3c24xx_spi_pmops = {