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: 3770991 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AC6109F376 for ; Wed, 5 Mar 2014 07:17:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1A9F2024C for ; Wed, 5 Mar 2014 07:17:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D25BB20237 for ; Wed, 5 Mar 2014 07:17:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751646AbaCEHRa (ORCPT ); Wed, 5 Mar 2014 02:17:30 -0500 Received: from mail-pd0-f179.google.com ([209.85.192.179]:37957 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751579AbaCEHR3 (ORCPT ); Wed, 5 Mar 2014 02:17:29 -0500 Received: by mail-pd0-f179.google.com with SMTP id w10so683626pde.38 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=cPD5uRsHXhPRZuOXyt46f6vVlTDLCeAutoRWddqQetKKcry1W6xN603HCeApGcic9C UukKYlaexFass8sCN/sLgU97FAwS4Yd69y+0FJn5R9oxdJ2a2AKd/8OSDdQUZm8RmO2a M4pxISTKnRr7aAr5sh31+InhUm8CgG8S9zZU9liw7Rd2rXDNPEFfxTCkTh++8+E7sR1p QE30e/s+l5JiUE+HFgadVbHuGoUfAs8ebviWLj3A7cF0LR+5SB0qPX7BhAPS06L3iZBR J4N84/YiYs8iCooSXc0nQBe6ssykZXBc4W1L/dESbe9k/pSTbkt51pp2pOQaGVygBOSx xrtQ== X-Gm-Message-State: ALoCoQlrOPYBOI7ywvLN34XF9DZdw4CPJYt0Bl1Ku6zMphuo1g1gQfkhyD8hX3lpxsqhfOMjf7Uw 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-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 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 = {