From: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
To: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
Kevin Hilman
<khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>,
"Cousson, Benoit" <b-cousson-l0cyMroinI0@public.gmane.org>,
Paul Walmsley <paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 6/6 v7] usb: musb: Using runtime pm APIs for musb.
Date: Wed, 16 Feb 2011 15:56:39 +0300 [thread overview]
Message-ID: <4D5BC987.7090207@ru.mvista.com> (raw)
In-Reply-To: <1297859298-27861-7-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
Hello.
On 16-02-2011 15:28, Hema HK wrote:
> Calling runtime pm APIs pm_runtime_put_sync() and pm_runtime_get_sync()
> for enabling/disabling the clocks, sysconfig settings.
> Enable clock, configure no-idle/standby when active and configure force idle/standby
> and disable clock when idled. This is taken care by the runtime framework when
> driver calls the pm_runtime_get_sync and pm_runtime_put_sync APIs.
> Need to configure MUSB into force standby and force idle mode when usb not used
> Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
> Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
> Cc: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
> Cc: Kevin Hilman <khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
> Cc: Cousson, Benoit <b-cousson-l0cyMroinI0@public.gmane.org>
> Cc: Paul Walmsley <paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
[...]
> Index: linux-2.6/drivers/usb/musb/omap2430.c
> ===================================================================
> --- linux-2.6.orig/drivers/usb/musb/omap2430.c
> +++ linux-2.6/drivers/usb/musb/omap2430.c
[...]
> @@ -498,8 +463,10 @@ static int omap2430_suspend(struct devic
> omap2430_low_level_exit(musb);
> otg_set_suspend(musb->xceiv, 1);
> omap2430_save_context(musb);
> - clk_disable(glue->clk);
>
> + if (!pm_runtime_suspended(dev))
> + if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_suspend)
Could be collapsed into single *if*...
> + dev->bus->pm->runtime_suspend(dev);
The above line is over-indented.
> return 0;
> }
>
> @@ -507,13 +474,10 @@ static int omap2430_resume(struct device
> {
> struct omap2430_glue *glue = dev_get_drvdata(dev);
> struct musb *musb = glue_to_musb(glue);
> - int ret;
>
> - ret = clk_enable(glue->clk);
> - if (ret) {
> - dev_err(dev, "faled to enable clock\n");
> - return ret;
> - }
> + if (!pm_runtime_suspended(dev))
> + if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_resume)
Could be collapsed into single *if*...
> + dev->bus->pm->runtime_resume(dev);
>
> omap2430_low_level_init(musb);
> omap2430_restore_context(musb);
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-02-16 12:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-16 12:28 [PATCH 0/6 v7]usb: musb: hwmod and runtime pm support for musb Hema HK
2011-02-16 12:28 ` [PATCH 1/6 v7] OMAP2430: hwmod data: Add USBOTG Hema HK
2011-02-16 12:28 ` [PATCH 2/6 v7] OMAP3xxx: " Hema HK
2011-02-16 12:28 ` [PATCH 3/6 v7] AM35xx: " Hema HK
2011-02-16 12:28 ` [PATCH 5/6] OMAP2+: musb: hwmod adaptation for musb registration Hema HK
[not found] ` <1297859298-27861-6-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-16 12:49 ` Sergei Shtylyov
[not found] ` <1297859298-27861-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-16 12:28 ` [PATCH 4/6 v7] OMAP4430: hwmod data: Adding USBOTG Hema HK
2011-02-16 12:28 ` [PATCH 6/6 v7] usb: musb: Using runtime pm APIs for musb Hema HK
[not found] ` <1297859298-27861-7-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-16 12:56 ` Sergei Shtylyov [this message]
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=4D5BC987.7090207@ru.mvista.com \
--to=sshtylyov-igf4poytycdqt0dzr+alfa@public.gmane.org \
--cc=b-cousson-l0cyMroinI0@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=hemahk-l0cyMroinI0@public.gmane.org \
--cc=khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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