From patchwork Thu Oct 13 11:37:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 77614 Delivered-To: patches@linaro.org Received: by 10.140.97.247 with SMTP id m110csp186660qge; Thu, 13 Oct 2016 04:38:02 -0700 (PDT) X-Received: by 10.25.32.134 with SMTP id g128mr9055652lfg.87.1476358681982; Thu, 13 Oct 2016 04:38:01 -0700 (PDT) Return-Path: Received: from mail-lf0-x22c.google.com (mail-lf0-x22c.google.com. [2a00:1450:4010:c07::22c]) by mx.google.com with ESMTPS id e123si8150722lfg.323.2016.10.13.04.38.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Oct 2016 04:38:01 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22c as permitted sender) client-ip=2a00:1450:4010:c07::22c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22c as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22c.google.com with SMTP id b75so131022016lfg.3 for ; Thu, 13 Oct 2016 04:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3EV594xN0N4O6v6YO6zOlbwe9WIlqp5Tpt3FaOKtUAc=; b=j7P6sVForOlBtXdQEIm9NdXnxcralmI3H24wc8wP4gzH5+ghweVpFI9wScA0YkMF/2 KmdxeiWOYOh9JVri053bQyjjcqpWKx1nN1XXsgnefM4M/vQH7vCgZoDKm3mC1z+tCzIT ILkp8FQl665FEBopgcdtYve3nGPeOzaAje4Dk= 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:in-reply-to :references; bh=3EV594xN0N4O6v6YO6zOlbwe9WIlqp5Tpt3FaOKtUAc=; b=JFODwUOyP7z8yzNzNQ4MCJAq7wgEqyxg4yDOMVfD3d03SejrHKk2VwY3knv+nphIOL pa3daD0nnIcXtKYZgpEjsBjhckyHg+5rL4ClI9ykcBoYAjx7OS9I2aUfcHO2V7KrFq0L Cgt9kEZxofRkrzMPaPNHlYj0rfD2qOjPUWbzI8+y1xWdFjEznuaGIHtgRULAe3cAm11V 4F4aSOGONbC2FU3qb2WgummQD/6Y/m92Sk+gBtpgf7tWHfSAuuzm64MG2Ws0O85RKde2 wrmovICqv47kyDL3JFBYukGS4eYv2Xfw6WCLZun/x1rnbYqHxo2YMCg/jUCOnnbw7UjM Q35w== X-Gm-Message-State: AA6/9RnE8m7CE5KhC9dWMUSsMdf+BbqxxJMqA3TcHa4VX6GyXqAFJaNic11eTU35DXt5YOr/ZAY= X-Received: by 10.25.208.11 with SMTP id h11mr9399941lfg.111.1476358681271; Thu, 13 Oct 2016 04:38:01 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id p76sm3648114lfd.11.2016.10.13.04.37.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Oct 2016 04:38:00 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Ulf Hansson Cc: Ritesh Raj Sarraf , Alan Stern , Oliver Neukum , USB list , Roger Tseng , Wei WANG Subject: [PATCH 5/6] mmc: rtsx_usb_sdmmc: Enable runtime PM autosuspend Date: Thu, 13 Oct 2016 13:37:39 +0200 Message-Id: <1476358660-8338-6-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1476358660-8338-1-git-send-email-ulf.hansson@linaro.org> References: <1476358660-8338-1-git-send-email-ulf.hansson@linaro.org> Enable runtime PM autosuspend for the rtsx_usb_sdmmc driver to avoid the device being runtime suspended and runtime resumed between each request. Let's use a default timeout of 50ms, to be consistent with other mmc hosts. Cc: Ritesh Raj Sarraf Cc: Alan Stern Signed-off-by: Ulf Hansson --- drivers/mmc/host/rtsx_usb_sdmmc.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index 6e9c0f8..dc1abd1 100644 --- a/drivers/mmc/host/rtsx_usb_sdmmc.c +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c @@ -1374,6 +1374,8 @@ static int rtsx_usb_sdmmc_drv_probe(struct platform_device *pdev) mutex_init(&host->host_mutex); rtsx_usb_init_host(host); + pm_runtime_use_autosuspend(&pdev->dev); + pm_runtime_set_autosuspend_delay(&pdev->dev, 50); pm_runtime_enable(&pdev->dev); #ifdef RTSX_USB_USE_LEDS_CLASS @@ -1428,6 +1430,7 @@ static int rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) mmc_free_host(mmc); pm_runtime_disable(&pdev->dev); + pm_runtime_dont_use_autosuspend(&pdev->dev); platform_set_drvdata(pdev, NULL); dev_dbg(&(pdev->dev),