From: "Rafael J. Wysocki" Subject: [Update][PATCH 2/3] tmio_mmc / PM: Use PM QoS latency constraint Date: Fri, 9 Mar 2012 00:03:06 +0100 Message-ID: <201203090003.07156.rjw@sisk.pl> References: <201203040101.53177.rjw@sisk.pl> <201203080027.27435.rjw@sisk.pl> <201203090000.17664.rjw@sisk.pl> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from ogre.sisk.pl ([217.79.144.158]:34608 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752456Ab2CHXAb (ORCPT ); Thu, 8 Mar 2012 18:00:31 -0500 In-Reply-To: <201203090000.17664.rjw@sisk.pl> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Linux PM list Cc: Linux MMC list , Guennadi Liakhovetski , Chris Ball , Ulf Hansson , Magnus Damm , Linus Walleij , Adrian Hunter , Mark Brown , Kevin Hilman From: Rafael J. Wysocki Make tmio_mmc call dev_pm_qos_expose_latency_limit() to expose the PM QoS latency limit to user space and specify the initial value of it as 100 microseconds. Signed-off-by: Rafael J. Wysocki --- drivers/mmc/host/tmio_mmc_pio.c | 5 +++++ 1 file changed, 5 insertions(+) Index: linux/drivers/mmc/host/tmio_mmc_pio.c =================================================================== --- linux.orig/drivers/mmc/host/tmio_mmc_pio.c +++ linux/drivers/mmc/host/tmio_mmc_pio.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -955,6 +956,8 @@ int __devinit tmio_mmc_host_probe(struct mmc_add_host(mmc); + dev_pm_qos_expose_latency_limit(&pdev->dev, 100); + /* Unmask the IRQs we want to know about */ if (!_host->chan_rx) irq_mask |= TMIO_MASK_READOP; @@ -993,6 +996,8 @@ void tmio_mmc_host_remove(struct tmio_mm || host->mmc->caps & MMC_CAP_NONREMOVABLE) pm_runtime_get_sync(&pdev->dev); + dev_pm_qos_hide_latency_limit(&pdev->dev); + mmc_remove_host(host->mmc); cancel_work_sync(&host->done); cancel_delayed_work_sync(&host->delayed_reset_work);