From patchwork Sun Jun 26 07:28:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9199229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 260B460754 for ; Sun, 26 Jun 2016 07:34:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 198282849E for ; Sun, 26 Jun 2016 07:34:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E5DB28542; Sun, 26 Jun 2016 07:34:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BEF6E2849E for ; Sun, 26 Jun 2016 07:34:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bH4XL-0004PM-0z; Sun, 26 Jun 2016 07:31:23 +0000 Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bH4VJ-00014P-WE for linux-arm-kernel@lists.infradead.org; Sun, 26 Jun 2016 07:29:18 +0000 Received: by mail-pf0-x22a.google.com with SMTP id c2so51926817pfa.2 for ; Sun, 26 Jun 2016 00:28:57 -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=SSX+g1Qer5peeA3b3Lit1W3t/sLWsa/pT/5deZFQwWg=; b=gly0qrQjOpCMoNpf/P1V/mm+XATgEXHr7ApgSL8Q0loXOKlDFX5VClLZ4ecTRJPWv4 QjKhtCSAPBJDqqO2uoj91hZnmpwEsXT9NtG7risFmlkPBhLEJxiHkD06p9z/rmy0VOY4 aEj5fLGLgFcy3ROvXNiR3U7yHmBrHaRhI7mYw= 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=SSX+g1Qer5peeA3b3Lit1W3t/sLWsa/pT/5deZFQwWg=; b=c4hTBy/steXeCqngWqtsnxX06OWRYjogtvRrPHLPT8RZZaAC11RftEe/Vb6wgErvNX U3qZVVRkXAXdADRpzR40FTmMV+xLS9Kfg0im7hyHaO24tkPZZokq7YEY2ZJCQhWS07Qy bPz6nrjxwYjjZK8Jl9RpL7QgSuXTdMFTYwASv09KC3LS0FHB4Ub/OkglGGgLlFKtF9mG H9IG5tj/HoYYM6szTOckRrMnLle8w1EYAwat9ZJ8nOEFlJbcWlVmP+UXy6LlS3lMFWSy 1w1Ydg2fLj5FQrgtECXdyOhpYa0E274CRWhTVImHn0CQFN1LmyXjkmg0lTMLBgUMu+gw XlFg== X-Gm-Message-State: ALyK8tLk5kIwqM/mcFTe7oLIF7Z9uqLBOMX6XVuh/m2BwbXj2eEDPh9Ek86EdFasxUsBaxw6 X-Received: by 10.98.36.130 with SMTP id k2mr22361369pfk.118.1466926137224; Sun, 26 Jun 2016 00:28:57 -0700 (PDT) Received: from localhost.localdomain (ip68-101-172-78.sd.sd.cox.net. [68.101.172.78]) by smtp.gmail.com with ESMTPSA id f138sm3790495pfa.17.2016.06.26.00.28.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Jun 2016 00:28:56 -0700 (PDT) From: Stephen Boyd To: linux-usb@vger.kernel.org Subject: [PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled Date: Sun, 26 Jun 2016 00:28:29 -0700 Message-Id: <20160626072838.28082-13-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.9.0.rc2.8.ga28705d In-Reply-To: <20160626072838.28082-1-stephen.boyd@linaro.org> References: <20160626072838.28082-1-stephen.boyd@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160626_002918_135847_0CB987B3 X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , Arnd Bergmann , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Peter Chen , Greg Kroah-Hartman , Andy Gross , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Sometimes the usb wrapper device is part of a power domain that needs to stay on as long as the device is active. Let's get and put the device in driver probe/remove so that we keep the power domain powered as long as the device is attached. We can fine tune this later to handle wakeup interrupts, etc. for finer grain power management later, but this is necessary to make sure we can keep accessing the device right now. Cc: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- drivers/usb/chipidea/ci_hdrc_msm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c index 520c85e701ef..430856ef1be3 100644 --- a/drivers/usb/chipidea/ci_hdrc_msm.c +++ b/drivers/usb/chipidea/ci_hdrc_msm.c @@ -80,6 +80,7 @@ static int ci_hdrc_msm_probe(struct platform_device *pdev) pm_runtime_no_callbacks(&pdev->dev); pm_runtime_enable(&pdev->dev); + pm_runtime_get(&pdev->dev); return 0; } @@ -88,6 +89,7 @@ static int ci_hdrc_msm_remove(struct platform_device *pdev) { struct platform_device *plat_ci = platform_get_drvdata(pdev); + pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); ci_hdrc_remove_device(plat_ci);