From: Biju Das <biju.das.jz@bp.renesas.com>
To: Sasha Finkelstein <fnkl.kernel@gmail.com>
Cc: "thierry.reding@gmail.com" <thierry.reding@gmail.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"marcan@marcan.st" <marcan@marcan.st>,
"sven@svenpeter.dev" <sven@svenpeter.dev>,
"alyssa@rosenzweig.io" <alyssa@rosenzweig.io>,
"asahi@lists.linux.dev" <asahi@lists.linux.dev>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 2/4] pwm: Add Apple PWM controller
Date: Wed, 2 Nov 2022 16:29:44 +0000 [thread overview]
Message-ID: <OS0PR01MB5922EC4F1AF0D8501D7CB1BF86399@OS0PR01MB5922.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAMT+MTQLJZsDSOtcQqV8e_j0XKfjNm+dVjeo7ocMjcYOPLAPvA@mail.gmail.com>
> Subject: Re: [PATCH v2 2/4] pwm: Add Apple PWM controller
>
> On Wed, 2 Nov 2022 at 19:02, Biju Das <biju.das.jz@bp.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
next prev parent reply other threads:[~2022-11-02 16:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 14:15 [PATCH v2 0/4] PWM and keyboard backlight driver for ARM Macs Sasha Finkelstein
2022-11-02 14:15 ` [PATCH v2 1/4] dt-bindings: pwm: Add Apple PWM controller Sasha Finkelstein
2022-11-02 15:03 ` Krzysztof Kozlowski
2022-11-02 14:15 ` [PATCH v2 2/4] " Sasha Finkelstein
2022-11-02 15:33 ` Biju Das
2022-11-02 15:57 ` Sasha Finkelstein
2022-11-02 16:02 ` Biju Das
2022-11-02 16:25 ` Sasha Finkelstein
2022-11-02 16:29 ` Biju Das [this message]
2022-11-02 16:40 ` Sasha Finkelstein
2022-11-02 16:43 ` Biju Das
2022-11-02 14:15 ` [PATCH v2 3/4] arm64: dts: apple: t8103: Add " Sasha Finkelstein
2022-11-02 14:15 ` [PATCH v2 4/4] MAINTAINERS: Add entries for Apple PWM driver Sasha Finkelstein
2022-11-06 15:49 ` [PATCH v2 0/4] PWM and keyboard backlight driver for ARM Macs Sven Peter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OS0PR01MB5922EC4F1AF0D8501D7CB1BF86399@OS0PR01MB5922.jpnprd01.prod.outlook.com \
--to=biju.das.jz@bp.renesas.com \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=devicetree@vger.kernel.org \
--cc=fnkl.kernel@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=robh+dt@kernel.org \
--cc=sven@svenpeter.dev \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®