linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Daniel Mack <zonque@gmail.com>
Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	neumann@teufel.de, vinod.koul@intel.com,
	dan.j.williams@intel.com, balbi@ti.com
Subject: Re: [PATCH v3 4/5] usb: musb: dsps: add support for suspend and resume
Date: Fri, 18 Oct 2013 11:58:27 +0200	[thread overview]
Message-ID: <52610643.1000607@linutronix.de> (raw)
In-Reply-To: <1382089175-13487-5-git-send-email-zonque@gmail.com>

On 10/18/2013 11:39 AM, Daniel Mack wrote:

> diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
> index da21a4e..ce5bbc6 100644
> --- a/drivers/usb/musb/musb_dsps.c
> +++ b/drivers/usb/musb/musb_dsps.c
> @@ -632,11 +648,54 @@ static const struct of_device_id musb_dsps_of_match[] = {
>  };
>  MODULE_DEVICE_TABLE(of, musb_dsps_of_match);
>  
> +#ifdef CONFIG_PM
> +static int dsps_suspend(struct device *dev)
> +{
> +	struct dsps_glue *glue = dev_get_drvdata(dev);
> +	const struct dsps_musb_wrapper *wrp = glue->wrp;
> +	struct musb *musb = platform_get_drvdata(glue->musb);
> +	void __iomem *mbase = musb->ctrl_base;
> +
> +	glue->context.control = dsps_readl(mbase, wrp->control);
> +	glue->context.epintr = dsps_readl(mbase, wrp->epintr_set);
> +	glue->context.coreintr = dsps_readl(mbase, wrp->coreintr_set);
> +	glue->context.phy_utmi = dsps_readl(mbase, wrp->phy_utmi);
> +	glue->context.mode = dsps_readl(mbase, wrp->mode);
> +	glue->context.tx_mode = dsps_readl(mbase, wrp->tx_mode);
> +	glue->context.rx_mode = dsps_readl(mbase, wrp->rx_mode);

Looking at this made me wonder, what about

   drivers/usb/phy/phy-am335x-control.c

Since it seems to work for you, maybe we don't need this after all :P

Sebastian

  reply	other threads:[~2013-10-18  9:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18  9:39 [PATCH v3 0/5] usb: musb_dsps: support for suspend and resume Daniel Mack
2013-10-18  9:39 ` [PATCH v3 1/5] usb: musb: call musb_port_suspend from musb_bus_suspend Daniel Mack
2013-10-18  9:39 ` [PATCH v3 2/5] usb: musb: conditionally save and restore the context on suspend Daniel Mack
2013-10-18  9:39 ` [PATCH v3 3/5] usb: musb: dsps: add {tx,rx}_mode to wrapper Daniel Mack
2013-10-18  9:39 ` [PATCH v3 4/5] usb: musb: dsps: add support for suspend and resume Daniel Mack
2013-10-18  9:58   ` Sebastian Andrzej Siewior [this message]
     [not found]     ` <52610643.1000607-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2013-10-18 10:00       ` Daniel Mack
     [not found] ` <1382089175-13487-1-git-send-email-zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-10-18  9:39   ` [PATCH v3 5/5] usb: musb: dsps: indentation and whitespace fixes Daniel Mack
2013-10-18  9:59   ` [PATCH v3 0/5] usb: musb_dsps: support for suspend and resume Sebastian Andrzej Siewior
     [not found]     ` <52610696.7020900-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2013-10-18 10:02       ` Daniel Mack
2013-10-18 10:05         ` Sebastian Andrzej Siewior
2013-10-28 11:06       ` Daniel Mack

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=52610643.1000607@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=balbi@ti.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=neumann@teufel.de \
    --cc=vinod.koul@intel.com \
    --cc=zonque@gmail.com \
    /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).