Re: [PATCH] : Bug fix in generic runtime pm APIs

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

 



On Monday, August 16, 2010, Kalliguddi, Hema wrote:
> Hi,
>  
> >> -----Original Message-----
> >> From: Kalliguddi, Hema
> >> Sent: Friday, August 13, 2010 7:08 PM
> >> To: Cousson, Benoit
> >> Cc: linux-omap@xxxxxxxxxxxxxxx; Tony Lindgren; Kevin Hilman; 
> >Paul.Walmsley[paul@xxxxxxxxx]
> >> Subject: RE: [PATCH] : Bug fix in generic runtime pm APIs
> >>
> >> Hi,
> >>
> >>> -----Original Message-----
> >>> From: Cousson, Benoit
> >>> Sent: Friday, August 13, 2010 6:29 PM
> >>> To: Kalliguddi, Hema
> >>> Cc: linux-omap@xxxxxxxxxxxxxxx; Tony Lindgren; Kevin Hilman;
> >>> Paul.Walmsley[paul@xxxxxxxxx]
> >>> Subject: Re: [PATCH] : Bug fix in generic runtime pm APIs
> >>>
> >>> Hi Hema,
> >>>
> >>> On 8/13/2010 2:31 PM, Kalliguddi, Hema wrote:
> >>>> From: Hema HK<hemahk@xxxxxx>
> >>>>
> >>>> pm_generic_runtime_resume/pm_generic_runtime_suspend api
> >>> should return zero if
> >>>> driver has not implemented runtime_suspend or runtime_resume apis.
> >>>
> >>> Why? Could you elaborate?
> >>>
> >> I don't have runtime_suspend and runtime_resume APIs 
> >implemented in the usb driver.
> >> When runtime_pm_get_sync is called there is a -22 as return value.
> >
> >It is still not clear why it is related to the following patch?
> >Can you explain in what context you observe that?
> 
> Sorry. It is not related o following commit. It is related to 
> http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=commit;h=1ebda92e47879750c739f6125ab11632a8f6f713
> 
> In this pm_generic_runtime_resume() API returns -EINVAL if there is no 
> runtime_resume and runtime_suspend APIs implemented by driver.
> 
> I observe this issue when I call runtime_pm_get_sync api in the driver and check for the return value.
> The return value is -22 because there is no runtime_resume API implemented in the USB driver.
> 
> >
> >> Is not it is valid if there is no runtime_suspend and 
> >runtime_resume implemented by drivers/device?
> >> Why should this API returns -EINVAL if there is no 
> >runtime_resume and runtime_suspend APIs ?
> >
> >Good question, you should maybe ask the original author, who is Rafael.
> >
> 
> Rafael,
> 
> Is it mandatory to implement the runtime_suspend and runtime_resume APIs in the driver
> even if there is nothing to done in the APIs?

That depends on the bus type routines.  If your bus type uses the generic
ones then yes, it is.

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux