Message ID | 1381399307-21534-3-git-send-email-ulf.hansson@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDF57NG2XIHRBLPW3GJAKGQEFW3ZLDI@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BB80A25C9D for <linaro@patches.linaro.org>; Thu, 10 Oct 2013 10:02:22 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id i4sf7591797oah.3 for <linaro@patches.linaro.org>; Thu, 10 Oct 2013 03:02:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state: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=TnOTNdzNwM+MR+DhxKUakISgW2EiTDKv+EuunPCy8BA=; b=GOq/ybE449fs4FyCMDaNgCu8p5mo6Gx4dDELUyhYbEHpWhp1xABTqSFpOPVubWI3Ji 8fnUvO81p68qP3KJm/SPhopbanT+jM4xThS+ZoD5JdBEhEYdFY+r6YMUG6EOAPgPMjrE EwUauRq6j7TDyfXOaVHtZuQshfqKFDK50LIJOJ3sSGAdS5QncyhoukRrjlyp8TvqVhD6 dJgzY4qOOh8NRLYePOWiFxQfsf7Yxr264RBDpcfsOxBKcTXwE48wft/0bcU/31+YhL0q MUHAZTvQU13i3rHPD8j7pWihjaWb5+jIQo3IrQMGZyrkf+Gd3vvkuo+1zdVgAbGb9Nb2 Gz1g== X-Received: by 10.50.82.103 with SMTP id h7mr4171534igy.5.1381399341447; Thu, 10 Oct 2013 03:02:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.11.179 with SMTP id r19ls952035qeb.76.gmail; Thu, 10 Oct 2013 03:02:21 -0700 (PDT) X-Received: by 10.221.16.200 with SMTP id pz8mr5239278vcb.53.1381399341334; Thu, 10 Oct 2013 03:02:21 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id sc5si13893048vdc.35.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 03:02:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 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.176; Received: by mail-vc0-f176.google.com with SMTP id lf11so1445673vcb.35 for <patchwork-forward@linaro.org>; Thu, 10 Oct 2013 03:02:21 -0700 (PDT) X-Gm-Message-State: ALoCoQkzfV615/Iag03RmCL91IbQp38A5rSHR1hWZlzHeCthOX9KpS9g2PILKFvhW8l0IC0dpeib X-Received: by 10.52.37.69 with SMTP id w5mr6381086vdj.32.1381399341094; Thu, 10 Oct 2013 03:02:21 -0700 (PDT) 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 u4csp361930vcz; Thu, 10 Oct 2013 03:02:20 -0700 (PDT) X-Received: by 10.204.233.129 with SMTP id jy1mr7120765bkb.27.1381399339955; Thu, 10 Oct 2013 03:02:19 -0700 (PDT) Received: from mail-bk0-f47.google.com (mail-bk0-f47.google.com [209.85.214.47]) by mx.google.com with ESMTPS id i5si7002876bkr.6.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 03:02:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.214.47 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.214.47; Received: by mail-bk0-f47.google.com with SMTP id mx12so856956bkb.34 for <patches@linaro.org>; Thu, 10 Oct 2013 03:02:19 -0700 (PDT) X-Received: by 10.204.69.12 with SMTP id x12mr11540396bki.12.1381399339232; Thu, 10 Oct 2013 03:02:19 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id l5sm26653429bko.7.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 03:02:18 -0700 (PDT) From: Ulf Hansson <ulf.hansson@linaro.org> To: linux-mmc@vger.kernel.org, Chris Ball <cjb@laptop.org> Cc: Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>, " Rafael J. Wysocki" <rjw@rjwysocki.net>, Kevin Hilman <khilman@linaro.org>, Alan Stern <stern@rowland.harvard.edu>, Mika Westerberg <mika.westerberg@linux.intel.com>, linux-pm@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org> Subject: [PATCH 2/2] mmc: core: Use autosuspend when applicable at runtime idle Date: Thu, 10 Oct 2013 12:01:47 +0200 Message-Id: <1381399307-21534-3-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1381399307-21534-1-git-send-email-ulf.hansson@linaro.org> References: <1381399307-21534-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.176 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: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index cdca8a7..7f0e900 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -205,6 +205,12 @@ static int mmc_runtime_resume(struct device *dev) static int mmc_runtime_idle(struct device *dev) { + if (pm_runtime_autosuspend_used(dev)) { + pm_runtime_mark_last_busy(dev); + pm_runtime_autosuspend(dev); + return -EBUSY; + } + return 0; }
Typically the runtime idle function is triggered after resume and probe. Instead of immediately requesting the device to go into in-active state we make use of the autosuspend, if we have enabled it earlier. Cc: Len Brown <len.brown@intel.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Kevin Hilman <khilman@linaro.org> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: linux-pm@vger.kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- drivers/mmc/core/bus.c | 6 ++++++ 1 file changed, 6 insertions(+)