Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1431356

[PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled

From Stephen Boyd <stephen.boyd@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled
Date 2016-06-26 09:30 +0200
Message-ID <rOcFY-8ei-7@gated-at.bofh.it> (permalink)
References <rOcFX-8ei-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <peter.chen@nxp.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
 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);
 
-- 
2.9.0.rc2.8.ga28705d

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled Stephen Boyd <stephen.boyd@linaro.org> - 2016-06-26 09:30 +0200
  Re: [PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled Peter Chen <hzpeterchen@gmail.com> - 2016-06-29 09:00 +0200
    Re: [PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled Peter Chen <hzpeterchen@gmail.com> - 2016-06-30 03:50 +0200
      Re: [PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled Peter Chen <hzpeterchen@gmail.com> - 2016-07-01 05:30 +0200

csiph-web