mbox series

[v1,0/5] usb drivers use devm_clk_get_enabled() helpers

Message ID 20240822040734.29412-1-liulei.rjpt@vivo.com (mailing list archive)
Headers show
Series usb drivers use devm_clk_get_enabled() helpers | expand

Message

Lei Liu Aug. 22, 2024, 4:07 a.m. UTC
The devm_clk_get_enabled() helpers:
    - call devm_clk_get()
    - call clk_prepare_enable() and register what is needed in order to
     call clk_disable_unprepare() when needed, as a managed resource.

This simplifies the code and avoids calls to clk_disable_unprepare().

---
The files ux500.c, mpfs.c, and pxa27x_udc.c have incorrect usage of 
certain interfaces due to the lack of synchronization during the 
commit updates. These issues have been corrected in the v1 version.

version 1 changes
1.ux500: Incorrect usage of clk_prepare_enable() should be corrected to
  devm_clk_get_enabled().
2.mpfs: Incorrect usage of devm_clk_get_enable() should be corrected to
  devm_clk_get_enabled().
3.pxa27x_udc: Incorrect usage of clk_prepare_enable() should be
  corrected to devm_clk_get_enabled().

Lei Liu (5):
  usb: aspeed_udc: Use devm_clk_get_enabled() helpers
  usb: pxa27x_udc: Use devm_clk_get_enabled() helpers
  usb: r8a66597-udc: Use devm_clk_get_enabled() helpers
  usb: mpfs: Use devm_clk_get_enabled() helpers
  usb: ux500: Use devm_clk_get_enabled() helpers

 drivers/usb/gadget/udc/aspeed_udc.c   |  9 +--------
 drivers/usb/gadget/udc/pxa27x_udc.c   |  6 +-----
 drivers/usb/gadget/udc/r8a66597-udc.c | 16 ++++------------
 drivers/usb/musb/mpfs.c               | 22 ++++++----------------
 drivers/usb/musb/ux500.c              | 18 ++++--------------
 5 files changed, 16 insertions(+), 55 deletions(-)

Comments

Greg KH Aug. 22, 2024, 4:27 a.m. UTC | #1
On Thu, Aug 22, 2024 at 12:07:25PM +0800, Lei Liu wrote:
> The devm_clk_get_enabled() helpers:
>     - call devm_clk_get()
>     - call clk_prepare_enable() and register what is needed in order to
>      call clk_disable_unprepare() when needed, as a managed resource.
> 
> This simplifies the code and avoids calls to clk_disable_unprepare().
> 
> ---
> The files ux500.c, mpfs.c, and pxa27x_udc.c have incorrect usage of 
> certain interfaces due to the lack of synchronization during the 
> commit updates. These issues have been corrected in the v1 version.
> 
> version 1 changes
> 1.ux500: Incorrect usage of clk_prepare_enable() should be corrected to
>   devm_clk_get_enabled().
> 2.mpfs: Incorrect usage of devm_clk_get_enable() should be corrected to
>   devm_clk_get_enabled().
> 3.pxa27x_udc: Incorrect usage of clk_prepare_enable() should be
>   corrected to devm_clk_get_enabled().

Patch versions start at 1, this should be 2, right?
Lei Liu Aug. 22, 2024, 4:46 a.m. UTC | #2
on 2024/8/22 12:27, Greg Kroah-Hartman wrote:
> On Thu, Aug 22, 2024 at 12:07:25PM +0800, Lei Liu wrote:
>> The devm_clk_get_enabled() helpers:
>>      - call devm_clk_get()
>>      - call clk_prepare_enable() and register what is needed in order to
>>       call clk_disable_unprepare() when needed, as a managed resource.
>>
>> This simplifies the code and avoids calls to clk_disable_unprepare().
>>
>> ---
>> The files ux500.c, mpfs.c, and pxa27x_udc.c have incorrect usage of
>> certain interfaces due to the lack of synchronization during the
>> commit updates. These issues have been corrected in the v1 version.
>>
>> version 1 changes
>> 1.ux500: Incorrect usage of clk_prepare_enable() should be corrected to
>>    devm_clk_get_enabled().
>> 2.mpfs: Incorrect usage of devm_clk_get_enable() should be corrected to
>>    devm_clk_get_enabled().
>> 3.pxa27x_udc: Incorrect usage of clk_prepare_enable() should be
>>    corrected to devm_clk_get_enabled().
> Patch versions start at 1, this should be 2, right?

Hi,Do I need to update the patch from v1 to v2 again?

Lei Liu


>
Greg KH Aug. 22, 2024, 5:14 a.m. UTC | #3
On Thu, Aug 22, 2024 at 12:46:10PM +0800, Lei Liu wrote:
> 
> on 2024/8/22 12:27, Greg Kroah-Hartman wrote:
> > On Thu, Aug 22, 2024 at 12:07:25PM +0800, Lei Liu wrote:
> > > The devm_clk_get_enabled() helpers:
> > >      - call devm_clk_get()
> > >      - call clk_prepare_enable() and register what is needed in order to
> > >       call clk_disable_unprepare() when needed, as a managed resource.
> > > 
> > > This simplifies the code and avoids calls to clk_disable_unprepare().
> > > 
> > > ---
> > > The files ux500.c, mpfs.c, and pxa27x_udc.c have incorrect usage of
> > > certain interfaces due to the lack of synchronization during the
> > > commit updates. These issues have been corrected in the v1 version.
> > > 
> > > version 1 changes
> > > 1.ux500: Incorrect usage of clk_prepare_enable() should be corrected to
> > >    devm_clk_get_enabled().
> > > 2.mpfs: Incorrect usage of devm_clk_get_enable() should be corrected to
> > >    devm_clk_get_enabled().
> > > 3.pxa27x_udc: Incorrect usage of clk_prepare_enable() should be
> > >    corrected to devm_clk_get_enabled().
> > Patch versions start at 1, this should be 2, right?
> 
> Hi,Do I need to update the patch from v1 to v2 again?

Yes please, otherwise our tools will get confused.

greg k-h