From patchwork Fri Jun 12 16:55:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mirza Krak X-Patchwork-Id: 6599731 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D81889F2F4 for ; Fri, 12 Jun 2015 16:55:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0DACF2068F for ; Fri, 12 Jun 2015 16:55:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 12F112068D for ; Fri, 12 Jun 2015 16:55:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751002AbbFLQzf (ORCPT ); Fri, 12 Jun 2015 12:55:35 -0400 Received: from mail-la0-f47.google.com ([209.85.215.47]:36464 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750870AbbFLQzf (ORCPT ); Fri, 12 Jun 2015 12:55:35 -0400 Received: by lacny3 with SMTP id ny3so4891256lac.3 for ; Fri, 12 Jun 2015 09:55:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FDPXLpOUhTJ+qMB8qPWrR78hnLtnGhgObXxjdxAVbqA=; b=Qh7EZuUakXS7BaPIp7XRQUGsTUC/BatSYIL8qaIFHFPDiPeeRhg0owQJyz/Ehfmrlj bejXaGJo9Dr+OK9EtAJO3zmaamSgqqXpWvHtjldJ9J0uL24gdDsYzSAfr9LM/J9FwHP7 iduGDoesU4yQxbE6rQxxFWUeZILLzVBjTs2Ld9ZuDFC9WMzOGIOLr9/gvnp2ok30yIUz M9bBEp0ZfrvjjEbGD8ToezjaQQuwMV6plJKF6k+qrxbbCdXchGgGpWzGNu+sPFRlw/zg QlU5gjV5xMf0neMFDht9osFgxXS7aEMBVrmqY3WmpqX28lO5PY6ERH/ikWI7ntFx3sUR paTw== X-Gm-Message-State: ALoCoQnpxi1cs/dwSHBbiiAPDcNfUZtpCAMH6eJPfFDNhk//O3/XCzIR+6LyH3C3SYEqqVCnGwHv X-Received: by 10.112.140.197 with SMTP id ri5mr15686912lbb.37.1434128133848; Fri, 12 Jun 2015 09:55:33 -0700 (PDT) Received: from mirza-hm.lan ([80.252.212.150]) by mx.google.com with ESMTPSA id rg6sm931648lbb.23.2015.06.12.09.55.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jun 2015 09:55:33 -0700 (PDT) From: Mirza Krak X-Google-Original-From: Mirza Krak < mirza.krak@hostmobility.com > To: broonie@kernel.org, linux-spi@vger.kernel.org Cc: Mirza Krak Subject: [PATCH 1/1 v2] spi: fsl-dspi: Use pinctrl PM helpers Date: Fri, 12 Jun 2015 18:55:22 +0200 Message-Id: <1434128122-773-1-git-send-email-mirza.krak@hostmobility.com> X-Mailer: git-send-email 2.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, T_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 From: Mirza Krak Add support for "sleep" state of pinctrl. Signed-off-by: Mirza Krak --- Changes V2: - Added missing header drivers/spi/spi-fsl-dspi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index d1a39249704a..d6f362f37016 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -429,6 +430,8 @@ static int dspi_suspend(struct device *dev) spi_master_suspend(master); clk_disable_unprepare(dspi->clk); + pinctrl_pm_select_sleep_state(dev); + return 0; } @@ -437,6 +440,8 @@ static int dspi_resume(struct device *dev) struct spi_master *master = dev_get_drvdata(dev); struct fsl_dspi *dspi = spi_master_get_devdata(master); + pinctrl_pm_select_default_state(dev); + clk_prepare_enable(dspi->clk); spi_master_resume(master);