From: Felipe Balbi <balbi-l0cyMroinI0@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>
Subject: Re: [PATCH 3/5 v2] usb: musb: Idle path retention and offmode support for OMAP3
Date: Fri, 25 Feb 2011 15:34:31 +0200 [thread overview]
Message-ID: <20110225133431.GL4190@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <1298640246-21181-4-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
Hi,
minor comment.
On Fri, Feb 25, 2011 at 06:54:04PM +0530, Hema HK wrote:
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index b6dcc7e..43c69a9 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -244,6 +244,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
> if (is_otg_enabled(musb)) {
> #ifdef CONFIG_USB_GADGET_MUSB_HDRC
> if (musb->gadget_driver) {
> + pm_runtime_get_sync(musb->controller);
> otg_init(musb->xceiv);
>
> if (data->interface_type ==
> @@ -253,6 +254,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
> }
> #endif
> } else {
> + pm_runtime_get_sync(musb->controller);
> otg_init(musb->xceiv);
> if (data->interface_type ==
> MUSB_INTERFACE_UTMI)
> @@ -263,12 +265,24 @@ static int musb_otg_notifications(struct notifier_block *nb,
> case USB_EVENT_VBUS:
> DBG(4, "VBUS Connect\n");
>
> + if (musb->gadget_driver)
> + pm_runtime_get_sync(musb->controller);
> +
> otg_init(musb->xceiv);
> break;
>
> case USB_EVENT_NONE:
> DBG(4, "VBUS Disconnect\n");
>
> +#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> + if (is_otg_enabled(musb))
> + if (musb->gadget_driver)
> +#endif
> + {
> + pm_runtime_mark_last_busy(musb->controller);
> + pm_runtime_put_autosuspend(musb->controller);
> + }
> +
> if (data->interface_type == MUSB_INTERFACE_UTMI) {
> if (musb->xceiv->set_vbus)
> otg_set_vbus(musb->xceiv, 0);
> @@ -300,7 +314,12 @@ static int omap2430_musb_init(struct musb *musb)
> return -ENODEV;
> }
>
> - omap2430_low_level_init(musb);
> + status = pm_runtime_get_sync(dev);
> + if (status < 0) {
> + dev_err(dev, "pm_runtime_get_sync FAILED");
> + pm_runtime_disable(dev);
> + return -EINVAL;
> + }
instead, you should use a goto here and update the error handling below
if you need.
--
balbi
--
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
next prev parent reply other threads:[~2011-02-25 13:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 13:24 [PATCH 0/5 v2] usb: musb: Power management support Hema HK
2011-02-25 13:24 ` [PATCH 1/5 v2] usb: otg: TWL4030: Update the last_event variable Hema HK
[not found] ` <1298640246-21181-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-25 13:24 ` [PATCH 2/5 v2] usb: musb: Remove platform context save/restore API Hema HK
2011-02-25 13:24 ` [PATCH 3/5 v2] usb: musb: Idle path retention and offmode support for OMAP3 Hema HK
[not found] ` <1298640246-21181-4-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-25 13:34 ` Felipe Balbi [this message]
2011-02-25 13:24 ` [PATCH 4/5 v2] usb: musb: OMAP4430: Power down the PHY during board init Hema HK
2011-02-25 13:24 ` [PATCH 5/5 v2] usb: musb: OMAP4430: Save/restore the context Hema HK
2011-02-25 13:32 ` Felipe Balbi
2011-02-25 13:39 ` Hema Kalliguddi
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=20110225133431.GL4190@legolas.emea.dhcp.ti.com \
--to=balbi-l0cymroini0@public.gmane.org \
--cc=hemahk-l0cyMroinI0@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@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