linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Kevin Hilman <khilman@ti.com>
Cc: Felipe Balbi <balbi@ti.com>, linux-omap@vger.kernel.org
Subject: Re: [PATCH/RFC] ARM: OMAP: MUSB: disable omap_device auto-suspend
Date: Wed, 7 Dec 2011 08:49:56 +0200	[thread overview]
Message-ID: <20111207064954.GD32368@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <1322528190-9274-1-git-send-email-khilman@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

Hi,

On Mon, Nov 28, 2011 at 04:56:30PM -0800, Kevin Hilman wrote:
> The MUSB driver does not currently implment suspend/resume callbacks,

this is not entirelly true, actually. Such methods are missing for
omap2430 glue layer, not for MUSB itself. And the fact is that it's only
missing because we failed to use UNIVERSAL_DEV_PM_OPS for declaring
dev_pm_ops structure.

Can you see if this patch helps:

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index fd5dd46..d89caec 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -525,10 +525,8 @@ static int omap2430_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static struct dev_pm_ops omap2430_pm_ops = {
-	.runtime_suspend = omap2430_runtime_suspend,
-	.runtime_resume = omap2430_runtime_resume,
-};
+static UNIVERSAL_DEV_PM_OPS(omap2430_pm_ops, omap2430_runtime_suspend,
+		omap2430_runtime_resume, NULL);
 
 #define DEV_PM_OPS	(&omap2430_pm_ops)
 #else

You also have to remember that for host side PM to work, you depend on
your class driver supporting autosuspend feature. If it doesn't, then
its interface will never call usb_autopm_put_interface() and thus pm
counter will never decrease. Be sure to use a device whose driver
supports autosuspend feature.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2011-12-07  6:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29  0:56 [PATCH/RFC] ARM: OMAP: MUSB: disable omap_device auto-suspend Kevin Hilman
2011-11-30  0:39 ` Kevin Hilman
2011-12-07  6:49 ` Felipe Balbi [this message]
2011-12-07 19:37   ` Kevin Hilman
2012-01-29 22:57     ` Grazvydas Ignotas
2012-01-30 22:37       ` NeilBrown
2012-01-31  1:04         ` Grazvydas Ignotas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111207064954.GD32368@legolas.emea.dhcp.ti.com \
    --to=balbi@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).