Re: [PATCH v3 4/5] usb: musb: dsps: add support for suspend and resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux