From: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
To: Ladislav Michl <ladis-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
Cc: Bin Liu <b-liu-l0cyMroinI0@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
Subject: Re: [PATCH 0/2] musb-fixes for v4.9-rc2
Date: Fri, 4 Nov 2016 07:48:13 -0700 [thread overview]
Message-ID: <20161104144813.GF21430@atomide.com> (raw)
In-Reply-To: <20161104104026.GA27621-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
* Ladislav Michl <ladis-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org> [161104 03:41]:
> All your patches on top of current Linus' git and revert of:
> commit 87326e858448c40e32f142c0b8dcc59d7b27c641
> Author: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
> Date: Tue May 31 10:05:20 2016 -0500
>
> usb: musb: Remove extra PM runtime calls from 2430 glue layer
>
> does the trick for me (reverted patch which applies bellow). I also
> alternatively tried to increase pm_runtime_set_autosuspend_delay up
> to 1000 without luck.
OK thanks for narrowing it down. The patch does not seem to change
anything for me with 2430 glue layer, things work for me with and
without it. Care to check if all hunks of the patch are needed
for you..
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index 451b372..a623e45 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -218,8 +218,13 @@ static void omap_musb_mailbox_work(struct work_struct *mailbox_work)
> {
> struct omap2430_glue *glue = container_of(mailbox_work,
> struct omap2430_glue, omap_musb_mailbox_work);
> + struct musb *musb = glue_to_musb(glue);
> + struct device *dev = musb->controller;
>
> + pm_runtime_get_sync(dev);
> omap_musb_set_mailbox(glue);
> + pm_runtime_mark_last_busy(dev);
> + pm_runtime_put_autosuspend(dev);
> }
>
> static irqreturn_t omap2430_musb_interrupt(int irq, void *__hci)
..is just the above enough..
> @@ -289,6 +294,16 @@ static int omap2430_musb_init(struct musb *musb)
> phy_init(musb->phy);
> phy_power_on(musb->phy);
>
> + /*
> + * Enable runtime PM for musb parent (this driver). We can't
> + * do it earlier as struct musb is not yet allocated and we
> + * need to touch the musb registers for runtime PM.
> + */
> + pm_runtime_enable(glue->dev);
> + status = pm_runtime_get_sync(glue->dev);
> + if (status < 0)
> + goto err1;
> +
> l = musb_readl(musb->mregs, OTG_INTERFSEL);
>
> if (data->interface_type == MUSB_INTERFACE_UTMI) {
> @@ -312,7 +327,11 @@ static int omap2430_musb_init(struct musb *musb)
> if (glue->status != MUSB_UNKNOWN)
> omap_musb_set_mailbox(glue);
>
> + pm_runtime_put(glue->dev);
> return 0;
> +
> +err1:
> + return status;
> }
>
> static void omap2430_musb_enable(struct musb *musb)
> @@ -512,10 +531,6 @@ static int omap2430_probe(struct platform_device *pdev)
> goto err2;
> }
>
> - pm_runtime_enable(glue->dev);
> - pm_runtime_use_autosuspend(glue->dev);
> - pm_runtime_set_autosuspend_delay(glue->dev, 100);
> -
> ret = platform_device_add(musb);
> if (ret) {
> dev_err(&pdev->dev, "failed to register musb device\n");
> @@ -538,7 +553,6 @@ static int omap2430_remove(struct platform_device *pdev)
> pm_runtime_get_sync(glue->dev);
> platform_device_unregister(glue->musb);
> pm_runtime_put_sync(glue->dev);
> - pm_runtime_dont_use_autosuspend(glue->dev);
> pm_runtime_disable(glue->dev);
>
> return 0;
..or are these init changes needed too?
Regards,
Tony
--
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:[~2016-11-04 14:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1476896620-15432-1-git-send-email-b-liu@ti.com>
[not found] ` <20161020082318.GA2903@localhost.localdomain>
[not found] ` <20161020082318.GA2903-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2016-10-20 12:35 ` [PATCH 0/2] musb-fixes for v4.9-rc2 Tony Lindgren
[not found] ` <20161020123524.oepmqvlhzzu7elgj-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-20 19:36 ` Ladislav Michl
[not found] ` <20161020193612.GA29736-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2016-10-21 7:17 ` Tony Lindgren
[not found] ` <20161021071722.2cetd2mt23t245ao-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-10-24 18:07 ` Tony Lindgren
[not found] ` <20161024180708.kpx6s2jb7dpg6xfx-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-01 21:13 ` Ladislav Michl
[not found] ` <20161101211358.GA2597-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2016-11-03 20:59 ` Tony Lindgren
[not found] ` <20161103205902.GB21430-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-03 22:55 ` Tony Lindgren
[not found] ` <20161103225532.GD21430-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-04 0:09 ` Ladislav Michl
2016-11-04 10:40 ` Ladislav Michl
[not found] ` <20161104104026.GA27621-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2016-11-04 14:48 ` Tony Lindgren [this message]
[not found] ` <20161104144813.GF21430-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-04 18:02 ` Ladislav Michl
2016-11-04 8:31 ` Felipe Balbi
[not found] ` <87r36rk5n9.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-11-04 9:46 ` Ladislav Michl
[not found] ` <20161104094624.GA19642-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2016-11-04 10:03 ` Ladislav Michl
2016-11-04 14:35 ` Tony Lindgren
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=20161104144813.GF21430@atomide.com \
--to=tony-4v6ys6ai5vpbdgjk7y7tuq@public.gmane.org \
--cc=b-liu-l0cyMroinI0@public.gmane.org \
--cc=kishon-l0cyMroinI0@public.gmane.org \
--cc=ladis-6z/3iImG2C8G8FEW9MqTrA@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;
as well as URLs for NNTP newsgroup(s).