From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 15 Jan 2021 16:47:38 +0100 From: Thierry Reding Subject: Re: [PATCH v2 1/5] gpio: mvebu: fix pwm .get_state period calculation Message-ID: References: <57860e4929a9d20d73f5e003a148b86a9f82310e.1610529002.git.baruch@tkos.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <57860e4929a9d20d73f5e003a148b86a9f82310e.1610529002.git.baruch@tkos.co.il> List-ID: To: Baruch Siach Cc: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Lee Jones , Linus Walleij , Bartosz Golaszewski , Russell King , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Thomas Petazzoni , Chris Packham , Sascha Hauer , Ralph Sennhauser , linux-pwm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org On Wed, Jan 13, 2021 at 11:22:41AM +0200, Baruch Siach wrote: > The period is the sum of on and off values. That is, calculate period as >=20 > ($on + $off) / clkrate >=20 > instead of >=20 > $off / clkrate - $on / clkrate >=20 > that makes no sense. >=20 > Reported-by: Russell King > Fixes: 757642f9a584e ("gpio: mvebu: Add limited PWM support") > Signed-off-by: Baruch Siach > --- > drivers/gpio/gpio-mvebu.c | 19 ++++++++----------- > 1 file changed, 8 insertions(+), 11 deletions(-) Acked-by: Thierry Reding