From patchwork Fri Jun 12 10:01:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mirza Krak X-Patchwork-Id: 6597201 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 AA1B99F399 for ; Fri, 12 Jun 2015 10:02:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B153E20575 for ; Fri, 12 Jun 2015 10:02:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EC8120663 for ; Fri, 12 Jun 2015 10:01:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755285AbbFLKBx (ORCPT ); Fri, 12 Jun 2015 06:01:53 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:36356 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755267AbbFLKBt (ORCPT ); Fri, 12 Jun 2015 06:01:49 -0400 Received: by lazv15 with SMTP id v15so18344539laz.3 for ; Fri, 12 Jun 2015 03:01:47 -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=q9byw8McqMLVRfcrLTYumDKghQGpSMGe5019iMYZ7lo=; b=nLu9eARj/yzCM/egm5F0xjbh+cwR4JEg9Nh1YQCaRzZldbspQ8MXRiMEf7cctT68ZO v4tys4dApt2Ty766HwNGEu+kuWEkwSHWgOjuCgoWPnN7n7DziNqhBZ1fGQbse8oaFxqV RAivDOAL8WmwVQbRaRF+tJr/+pwtydzU+PLA7sx1fbFjhOfmo7Qjlp7xG4YtbqLvpTGN bW47IvPYMr6+Xmuj8Bv0udV896cwlljLfhlqsRbBdY54vl91YUU600PcQBFyqYnZM8hO ku8XthWPG1HsQTMHadLmlh27zRFRLrq1zRg8RvzNvRu8Fz7YsoNn8ifux9m9DYg9WDkM ez1Q== X-Gm-Message-State: ALoCoQnDZKe6H/pYS2hyM/poMTHZofsnUFO5cZPkfYBy1rEsp7e8ngY+ZSKdF41cKVFQPaZGhtF6 X-Received: by 10.152.3.199 with SMTP id e7mr14677642lae.78.1434103307096; Fri, 12 Jun 2015 03:01:47 -0700 (PDT) Received: from mirza-hm.lan ([80.252.212.150]) by mx.google.com with ESMTPSA id h3sm739312lbj.19.2015.06.12.03.01.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jun 2015 03:01:46 -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] spi: fsl-dspi: Use pinctrl PM helpers Date: Fri, 12 Jun 2015 12:01:43 +0200 Message-Id: <1434103303-5120-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 --- drivers/spi/spi-fsl-dspi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index d1a39249704a..3e76eb710efd 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -429,6 +429,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 +439,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);