lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OS0PR01MB5922EC4F1AF0D8501D7CB1BF86399@OS0PR01MB5922.jpnprd01.prod.outlook.com>
Date:   Wed, 2 Nov 2022 16:29:44 +0000
From:   Biju Das <biju.das.jz@...renesas.com>
To:     Sasha Finkelstein <fnkl.kernel@...il.com>
CC:     "thierry.reding@...il.com" <thierry.reding@...il.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>,
        "marcan@...can.st" <marcan@...can.st>,
        "sven@...npeter.dev" <sven@...npeter.dev>,
        "alyssa@...enzweig.io" <alyssa@...enzweig.io>,
        "asahi@...ts.linux.dev" <asahi@...ts.linux.dev>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-pwm@...r.kernel.org" <linux-pwm@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 2/4] pwm: Add Apple PWM controller


> Subject: Re: [PATCH v2 2/4] pwm: Add Apple PWM controller
> 
> On Wed, 2 Nov 2022 at 19:02, Biju Das <biju.das.jz@...renesas.com>
> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ