RE: [PATCH v2 2/4] pwm: Add Apple PWM controller

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

 



> Subject: Re: [PATCH v2 2/4] pwm: Add Apple PWM controller
> 
> On Wed, 2 Nov 2022 at 19:02, Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> wrote:
> 
> > I just asked, because you are unnecessarily turning on the clock or
> > increasing the usage Count, even if it is not used by anyone during
> probe.
> 
> It is used to get the clock rate so it can be used to convert between
> seconds and pwm ticks, and the pwm uses that clock, so it is kept
> enabled while the pwm is active.

You don't need to enable the pwm clock for getting the clock rate.
devm_clk_get() and then get the rate.

Then enable the clk whenever pwm is enabled
And disable the clk whenever pwm is disabled.

Cheers,
Biju




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux