From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
"andrew@aj.id.au" <andrew@aj.id.au>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
"joel@jms.id.au" <joel@jms.id.au>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
BMC-SW <BMC-SW@aspeedtech.com>,
"lee.jones@linaro.org" <lee.jones@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [v2 2/2] pwm: Add Aspeed ast2600 PWM support
Date: Mon, 3 May 2021 08:23:38 +0200 [thread overview]
Message-ID: <20210503062338.meohvoth7cyfppvu@pengutronix.de> (raw)
In-Reply-To: <C95A3A13-996E-4F52-BEFE-16BC1E74EB22@aspeedtech.com>
[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]
Hello,
your second reply is nearly identical to the first. It would be helpful
to only write new stuff in new mail. I think there is only a single new
paragraph that I will reply to here.
On Mon, May 03, 2021 at 05:57:23AM +0000, Billy Tsai wrote:
> On 2021/4/27, 4:44 AM,Uwe Kleine-Königwrote:
> > Also please round down in the division to never provide a duty_cycle
> > bigger than the requested vaule. Also you have to use the actually used
> > period as divider, not state->period.
>
> I don’t think that I should use the actually used period as divider.
> The state->duty_cycle is relative with state->period, not the actual period
> if I use the actual period the precision of the duty cycle may lose.
The strategy you should implement in .apply() is: Pick the biggest
period that is not bigger than the requested period. With that period
pick the biggest duty_cycle that is not bigger than the requested
duty_cycle.
As the actual period might be smaller than state->period, dividing by
the latter yields a result that might be too small.
See commit 8035e6c66a5e98f098edf7441667de74affb4e78 (currently in next)
for a similar example.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-05-03 6:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 10:49 [v2 0/2] Support pwm driver for aspeed ast26xx Billy Tsai
2021-04-14 10:49 ` [v2 1/2] dt-bindings: Add bindings for aspeed pwm-tach and pwm Billy Tsai
2021-04-14 14:50 ` Rob Herring
2021-04-14 22:15 ` Rob Herring
2021-04-15 3:44 ` Billy Tsai
2021-04-15 14:43 ` Rob Herring
2021-04-16 8:44 ` Billy Tsai
2021-04-14 10:49 ` [v2 2/2] pwm: Add Aspeed ast2600 PWM support Billy Tsai
2021-04-26 20:43 ` Uwe Kleine-König
2021-05-03 4:42 ` Billy Tsai
2021-05-03 5:57 ` Billy Tsai
2021-05-03 6:23 ` Uwe Kleine-König [this message]
2021-05-03 6:10 ` Uwe Kleine-König
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=20210503062338.meohvoth7cyfppvu@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=BMC-SW@aspeedtech.com \
--cc=andrew@aj.id.au \
--cc=billy_tsai@aspeedtech.com \
--cc=devicetree@vger.kernel.org \
--cc=joel@jms.id.au \
--cc=kernel@pengutronix.de \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).