On Tue, Dec 3, 2024 at 7:32 PM Stephan Gerhold <stephan.gerhold@xxxxxxxxxx> wrote: > > On Tue, Dec 03, 2024 at 10:19:32AM +0100, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> > > > > Use devm_clk_get_optional_enabled() to avoid having to enable the clocks > > separately as well as putting the clocks in error path and the remove() > > callback. > > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> > > FWIW: Ideally, the driver shouldn't keep on the clock all the time in > the first place, since this will prevent reaching deeper low power > states. So while this cleanup is nice, I think it will have to be > reverted again once someone fixes that. > > If you're working on refactoring this rarely cared for driver, is there > any chance you could add some form of runtime PM while you're at it? :-) > Sure, I will most likely be doing more work on this in the future, I can think about it. This patch was about code shrink, not functional changes so I prefer to keep it as is. Bart