From patchwork Tue Feb 4 15:58:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 24115 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f200.google.com (mail-ig0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6D67E202FA for ; Tue, 4 Feb 2014 15:59:42 +0000 (UTC) Received: by mail-ig0-f200.google.com with SMTP id k19sf16496923igc.3 for ; Tue, 04 Feb 2014 07:59:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=gtnKZKUGVpEy/SbL+NoxlLI07CIR+6JLC5jZDMv/S/o=; b=Awu2YgJcv0UC4uGmZejtxovg5/eWhjyddQA5OXVNW9EeRuHk1IQ8sfgwifooYpXuyN T3DP6qkDCHV6Ely8LbNazlTqWbId0nNixqBYL9BEHG/e8n8m/FzOVkzFB4k5HRpbQpvL zKdhs+1HBnyb9/0Ji01Jl2tjcwJ++DkzqY0DVtg834WgyMAnQuRzkghyO50/VTTaoPIv vzrNH2WXiXj0P71eqeTEa1Tvijd4BXOssPQ+0ghGbdyd1tto8FRpzPBwPA7kM5wTc98l LczPTq7tyIvojCCKzFThH6Izsepf3dQfk9tmXnC7t1TYxf0nZ4oh3OTNmXcocK7/5iXS w+2w== X-Gm-Message-State: ALoCoQl09Cqub9wQIZZVgEisXUETuPBgPBcYW7V6zJ7H6bUQGmS+G9+0Z9GMQrTv5twGcVJPnURJ X-Received: by 10.50.112.10 with SMTP id im10mr8412796igb.1.1391529581639; Tue, 04 Feb 2014 07:59:41 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.161 with SMTP id o30ls2429204qge.98.gmail; Tue, 04 Feb 2014 07:59:41 -0800 (PST) X-Received: by 10.221.55.133 with SMTP id vy5mr24525009vcb.17.1391529581534; Tue, 04 Feb 2014 07:59:41 -0800 (PST) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id xe7si8311603vec.78.2014.02.04.07.59.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Feb 2014 07:59:41 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id jz11so6070185veb.36 for ; Tue, 04 Feb 2014 07:59:41 -0800 (PST) X-Received: by 10.58.229.164 with SMTP id sr4mr32519257vec.18.1391529581464; Tue, 04 Feb 2014 07:59:41 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp245371vcz; Tue, 4 Feb 2014 07:59:40 -0800 (PST) X-Received: by 10.112.39.167 with SMTP id q7mr178269lbk.82.1391529580172; Tue, 04 Feb 2014 07:59:40 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx.google.com with ESMTPS id mq2si12962499lbb.92.2014.02.04.07.59.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Feb 2014 07:59:40 -0800 (PST) Received-SPF: neutral (google.com: 209.85.217.182 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id w7so6484217lbi.41 for ; Tue, 04 Feb 2014 07:59:39 -0800 (PST) X-Received: by 10.152.2.169 with SMTP id 9mr531996lav.48.1391529579498; Tue, 04 Feb 2014 07:59:39 -0800 (PST) Received: from localhost.localdomain (host-95-199-220-119.mobileonline.telia.com. [95.199.220.119]) by mx.google.com with ESMTPSA id dm8sm35906603lad.7.2014.02.04.07.59.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Feb 2014 07:59:38 -0800 (PST) From: Ulf Hansson To: Russell King , linux-arm-kernel@lists.infradead.org Cc: Alessandro Rubini , Linus Walleij , Wolfram Sang , Chris Ball , Mark Brown , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-spi@vger.kernel.org, linux-mmc@vger.kernel.org, Ulf Hansson Subject: [PATCH 08/17] spi: pl022: Fully gate clocks at request inactivity Date: Tue, 4 Feb 2014 16:58:49 +0100 Message-Id: <1391529538-21685-9-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1391529538-21685-1-git-send-email-ulf.hansson@linaro.org> References: <1391529538-21685-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use clk_disable_unprepare and clk_prepare_enable from the runtime PM callbacks, to fully gate|ungate clocks. Potentially this will save more power, depending on the clock tree for the current SOC. Cc: Mark Brown Signed-off-by: Ulf Hansson --- drivers/spi/spi-pl022.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index db829a1..2bb238f 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2355,7 +2355,7 @@ static int pl022_runtime_suspend(struct device *dev) { struct pl022 *pl022 = dev_get_drvdata(dev); - clk_disable(pl022->clk); + clk_disable_unprepare(pl022->clk); pinctrl_pm_select_idle_state(dev); return 0; @@ -2366,7 +2366,7 @@ static int pl022_runtime_resume(struct device *dev) struct pl022 *pl022 = dev_get_drvdata(dev); pinctrl_pm_select_default_state(dev); - clk_enable(pl022->clk); + clk_prepare_enable(pl022->clk); return 0; }