Re: [PATCH v1 1/4] usb: ehci-exynos: Use devm_clk_get_enabled() helpers

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

 



On Sat, Mar 02, 2024 at 10:05:46PM +0530, Anand Moon wrote:
> On Sat, 2 Mar 2024 at 21:19, Christophe JAILLET
> <christophe.jaillet@xxxxxxxxxx> wrote:
> > Le 01/03/2024 à 20:38, Anand Moon a écrit :

> > > 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 the calls to clk_disable_unprepare().
> > >
> > > While at it, use dev_err_probe consistently, and use its return value
> > > to return the error code.

> > > @@ -260,25 +248,17 @@ static int exynos_ehci_suspend(struct device *dev)
> > >
> > >       exynos_ehci_phy_disable(dev);
> > >
> > > -     clk_disable_unprepare(exynos_ehci->clk);

> > I don't think that removing clk_[en|dis]abble from the suspend and
> > resume function is correct.
> >
> > The goal is to stop some hardware when the system is suspended, in order
> > to save some power.
> Yes correct,
> >
> > Why did you removed it?

> devm_clk_get_enabled  function register callback for clk_prepare_enable
> and clk_disable_unprepare, so when the clock resource is not used it should get
> disabled.
> 
> [0] https://elixir.bootlin.com/linux/latest/source/drivers/clk/clk-devres.c#L75
> 
> I have also tested with rtc suspend & resume and did not find any issue.

You seem to be totally confused about how devres works, and arguing back
after Christophe points this out to you instead of going back and doing
the homework you should have done before posting these patches is really
not OK (e.g. as you're wasting other people's time).

And you clearly did not test these patches enough to confirm that you
didn't break the driver.

Johan




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux