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: 70859 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp554708qgy; Sun, 26 Jun 2016 00:29:24 -0700 (PDT) X-Received: by 10.98.213.2 with SMTP id d2mr22341232pfg.123.1466926162523; Sun, 26 Jun 2016 00:29:22 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si18076330paj.218.2016.06.26.00.29.22; Sun, 26 Jun 2016 00:29:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752115AbcFZH3P (ORCPT + 8 others); Sun, 26 Jun 2016 03:29:15 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:36860 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752125AbcFZH25 (ORCPT ); Sun, 26 Jun 2016 03:28:57 -0400 Received: by mail-pf0-f174.google.com with SMTP id t190so51885203pfb.3 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=i08mgMJjR9hdzq+Hnr7t58OAkVqMKe2Na2EqzzzLPTNJpAMBjXS+U7NGaIUrAPD6JX myBSqVHj6XHDU7jOaw1Y/XKt1wI6bRQwi2BqOLiuQe+5fSBoiwE3xieYvhALr59JMfW+ dHb4IxBhq1ECbzkT6nu/3rRiFml7LY9VEtA6vA0R78pnGeMeFTQOvsTuyRWiu2jC1QhL kd1xkeBIrTtWHrGCAPNyvSYJvxjNko9fNahxTGNIVQdbt85Z9K2jj7Lb6S9NVg/KB2fD /IZLD2w4rzeiQt1z2M8FL31wbQaj58LyXVK47vWJZ42AKaIhX1BjZppDolTeIv3lPoK8 ly4A== X-Gm-Message-State: ALyK8tKyKo3/a5VsS3UgHHZyb3/ZL/Ejjom0fL4dnvFHSCuE2lI/ik4zHPBfPOJDS8x5n/hi 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson , Neil Armstrong , Arnd Bergmann , Felipe Balbi , Peter Chen , Greg Kroah-Hartman 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> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(+) -- 2.9.0.rc2.8.ga28705d -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);