RE: [PATCH v2 2/9] usb: cdns3: add runtime PM support

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

 




> -----Original Message-----
> From: Jun Li <jun.li@xxxxxxx>
> Sent: 2020年5月24日 13:58
> To: Peter Chen <peter.chen@xxxxxxx>; balbi@xxxxxxxxxx; mathias.nyman@xxxxxxxxx
> Cc: linux-usb@xxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>;
> pawell@xxxxxxxxxxx; rogerq@xxxxxx; gregkh@xxxxxxxxxxxxxxxxxxx
> Subject: RE: [PATCH v2 2/9] usb: cdns3: add runtime PM support
...

> > +static int cdns3_suspend(struct device *dev) {
> > +	struct cdns3 *cdns = dev_get_drvdata(dev);
> > +	unsigned long flags;
> > +
> > +	if (pm_runtime_status_suspended(dev))
> > +		pm_runtime_resume(dev);
> > +
> > +	if (cdns->roles[cdns->role]->suspend) {
> > +		spin_lock_irqsave(&cdns->lock, flags);
> > +		cdns->roles[cdns->role]->suspend(cdns, false);
> 
> Seems this hasn't been used, I did not find the implementation.

Ah, see gadget defined it.

> this role->suspend() is only to be used in system suspend but not in runtime suspend?
> 
> > +		spin_unlock_irqrestore(&cdns->lock, flags);
> >  	}
> >




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

  Powered by Linux