RE: [PATCH 8/8 ]usb : musb:Using runtime pm apis for musb.

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

 



 Hi,

>-----Original Message-----
>From: Sergei Shtylyov [mailto:sshtylyov@xxxxxxxxxx] 
>Sent: Wednesday, August 11, 2010 5:05 PM
>To: Kalliguddi, Hema
>Cc: linux-usb@xxxxxxxxxxxxxxx; linux-omap@xxxxxxxxxxxxxxx; 
>Basak, Partha; Felipe Balbi; Tony Lindgren; Kevin Hilman
>Subject: Re: [PATCH 8/8 ]usb : musb:Using runtime pm apis for musb.
>
>Hello.
>
>I wrote:
>
>>> Calling runtime pm APIs pm_runtime_put_sync() and 
>>> pm_runtime_get_sync() for enabling/disabling the clocks,sysconfig 
>>> settings.
>
>>> used omap_hwmod_enable_wakeup & omap_hwmod_disable_wakeup apis to 
>>> set/clear
>>> the wakeup enable bit.
>>> Also need to put the USB in force standby and force idle 
>mode when usb 
>>> not used
>>> and set it back to smart idle and smart stndby after wakeup.
>>> these cases are handled using the oh flags.
>>> For omap3430 auto idle bit has to be disabled because of 
>the errata.So 
>>> using HWMOD_NO_OCP_AUTOIDLE flag for OMAP3430.
>
>>> Signed-off-by: Hema HK <hemahk@xxxxxx>
>>> Signed-off-by: Basak, Partha <p-basak2@xxxxxx>
>
>>> Cc: Felipe Balbi <felipe.balbi@xxxxxxxxx>
>>> Cc: Tony Lindgren <tony@xxxxxxxxxxx>
>>> Cc: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
>
>[...]
>
>>> Index: linux-omap-pm/include/linux/usb/musb.h
>>> ===================================================================
>>> --- linux-omap-pm.orig/include/linux/usb/musb.h    2010-08-06 
>>> 10:44:06.000000000 -0400
>>> +++ linux-omap-pm/include/linux/usb/musb.h    2010-08-06 
>>> 10:44:42.946115274 -0400
>>> @@ -10,6 +10,9 @@
>>>  #ifndef __LINUX_USB_MUSB_H
>>>  #define __LINUX_USB_MUSB_H
>>>  
>>> +#include <linux/platform_device.h>
>
>>    You could just use incomplete declaration of 'struct 
>platfrom_device' 
>> instead of this #include.
>
>>> +#include <plat/omap_hwmod.h>
>
>    Did you think about the other platfroms where this file 
>doesn't exist? How 
>are they supposed to compile?!
>    I think this #include needs to be wrapped in #ifdef as well...

Good point. I did not think of it. It need not be wrapped. Instead I am changing the 
Enable_wakeup/disable_wakeup parameter to platform_device instead of omap_device.
So that I can avoid these includes.
>
>>> +
>>>  /* The USB role is defined by the connector used on the board, so 
>>> long as
>>>   * standards are being followed.  (Developer boards 
>sometimes won't.)
>>>   */
>>> @@ -129,6 +132,21 @@
>>>  
>>>      /* check usb device active state*/
>>>      int        (*is_usb_active)(struct device *dev);
>>> +
>>> +    /* omap hwmod data structure     */
>>> +    struct    omap_hwmod *oh;
>
>>    This should be wrapped into #ifdef, don't you think?
>
>>> +    /* enable clocks and set sysconfig register*/
>>> +    int        (*device_enable)(struct platform_device *pdev);
>>> +
>>> +    /* Disable clock and reset the sysconfig register settings*/
>>> +    int        (*device_idle)(struct platform_device *pdev);
>>> +
>>> +    /* set the enable wakeup bit of sysconfig register */
>>> +    int        (*enable_wakeup)(struct omap_device *od);
>>> +
>>> +    /* Clear the enable wakeup bit  of sysconfig register */
>>> +    int        (*disable_wakeup)(struct omap_device *od);
>
>>    This should be wrapped too, I think...

It will be taken care.
>
>WBR, Sergei
>
>--
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