From patchwork Tue Dec 3 10:04:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 21951 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 57625202AE for ; Tue, 3 Dec 2013 10:04:52 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id 5sf32773725qeb.3 for ; Tue, 03 Dec 2013 02:04:52 -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=ePhCuiVy6sya+G38Pc84CUD8GwV+pvrdbsNwcTzwqTU=; b=MtVPnx21cii/FjU45H+OTXxDUkzJZ+zrTL0E/0kNohcFuEhNlJjjOZ/O3jxqxqxs/7 a5kzQYkEip2XN+9LKkKYjdwHEXGHRWZE4+X3uoTjnt5FuYtBBgH+CNN4apOORl2s+rsp AY0uqkCEEeBMtYjSz044VlqyZTxT+5AQACaXZTfVpJGoqwb0Cyk80uXA3WD1HQoCS6aN hCbDT7wu7FyYrb8FLsj057fOY4CxEjRqmKNf2/EnWbKkW+hOQ66wJOOC73En48Xp0+kw dlBUPEd9Xc60VP8+ALXE94EGorpvnU/kuBW19JSmdHJWNc/2evSac1m+CNHMAXppfxUM VXlg== X-Gm-Message-State: ALoCoQlkTlTlRA5cw2T9UiUGEzwRlN3YtqgQeWRVWdlKpCj9Bvs7T8PUhQPgC7VVfq8TGBU1W5/D X-Received: by 10.236.0.232 with SMTP id 68mr29711091yhb.16.1386065092212; Tue, 03 Dec 2013 02:04:52 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.47.103 with SMTP id c7ls465312qen.24.gmail; Tue, 03 Dec 2013 02:04:52 -0800 (PST) X-Received: by 10.58.118.36 with SMTP id kj4mr3547580veb.2.1386065092131; Tue, 03 Dec 2013 02:04:52 -0800 (PST) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id de6si31079942vcb.109.2013.12.03.02.04.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 02:04:52 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ld13so9336267vcb.6 for ; Tue, 03 Dec 2013 02:04:52 -0800 (PST) X-Received: by 10.221.19.5 with SMTP id qi5mr54522473vcb.15.1386065091945; Tue, 03 Dec 2013 02:04:51 -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 u4csp194640vcz; Tue, 3 Dec 2013 02:04:51 -0800 (PST) X-Received: by 10.152.234.170 with SMTP id uf10mr1651915lac.43.1386065091052; Tue, 03 Dec 2013 02:04:51 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) by mx.google.com with ESMTPS id wj2si12597674lbb.163.2013.12.03.02.04.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 02:04:51 -0800 (PST) Received-SPF: neutral (google.com: 209.85.217.175 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id x18so8622580lbi.20 for ; Tue, 03 Dec 2013 02:04:50 -0800 (PST) X-Received: by 10.152.87.37 with SMTP id u5mr5854894laz.11.1386065090487; Tue, 03 Dec 2013 02:04:50 -0800 (PST) Received: from linaro-ulf.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id i8sm35583394lbh.2.2013.12.03.02.04.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 02:04:49 -0800 (PST) From: Ulf Hansson To: Russell King , linux-arm-kernel@lists.infradead.org Cc: Ulf Hansson Subject: [PATCH 6/6] amba: Add clk_prepare|unprepare in runtime PM callbacks Date: Tue, 3 Dec 2013 11:04:31 +0100 Message-Id: <1386065071-9529-7-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1386065071-9529-1-git-send-email-ulf.hansson@linaro.org> References: <1386065071-9529-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.220.175 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: , To fully gate the clock and thus potentially also save more power in runtime suspend state, extend clock handling with clk_prepare|unprepare in the runtime PM callbacks. Signed-off-by: Ulf Hansson --- drivers/amba/bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 0477131..4cee15a 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -95,7 +95,7 @@ static int amba_pm_runtime_suspend(struct device *dev) int ret = pm_generic_runtime_suspend(dev); if (ret == 0 && dev->driver) - clk_disable(pcdev->pclk); + clk_disable_unprepare(pcdev->pclk); return ret; } @@ -106,7 +106,7 @@ static int amba_pm_runtime_resume(struct device *dev) int ret; if (dev->driver) { - ret = clk_enable(pcdev->pclk); + ret = clk_prepare_enable(pcdev->pclk); /* Failure is probably fatal to the system, but... */ if (ret) return ret;